HN2new | past | comments | ask | show | jobs | submitlogin

2 minor notes:

1. This article offhandedly claims that document.write injection is async; it's been widely written otherwise; I'm curious as to what the evidence is.

2. In the Cleaning House section, the Google Analytics code can be loaded without the ternary statement, and just use the protocol neutral code that's already being used there for Facebook and Twitter.

    add('//www.google-analytics.com/ga.js', 'ga');


The reason for #2 is that the domain name changes to ssl.google-analytics.com for the https version.


I've spoken with the GA team a few times about this. While the protocol-relative URL works, it will throw an error in IE6 sometimes. Now you probably don't care about IE6 now. Good! But the GA team is not promising the naked URL will always work over SSL, so best to use the ternary with the subdomain.


1. Link? JQuery tutorials explain how to poll for successful completion of write-inserted script tags before calling client code.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: