Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I mean if you use the CDN jQuery the likelihood of loading jQuery up is fairly low considering its so ambiguous.


Is this usually actually true? It makes a ton of obvious sense, but I've seen numbers thrown around that suggest a surprisingly low number of people actually end up taking advantage of the cache.


It's 100% not true. It's also a pain in the arse if you serve everything over SSL like we do.


To the best of my knowledge, the only reason SSL could cause a problem is if you are specifying the protocol (http:// vs https://). The best way to handle this is to use a protocol-relative URL like "//ajax.googleapis.com/mylibrary". The browser will then infer the correct protocol.


You've obviously never dealt with ancient IE versions and script loading then...


I'm happy to be enlightened if you feel like sharing.



Thank you for this.




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

Search: