3 ms·
This only works if the CDN actually returns 4xx or 5xx codes. This still won't work if the CDN is getting DDOS'ed, as in taking forever to return anything.
by wyuenho 14y ago
This only works if the CDN actually returns 4xx or 5xx codes. This still won't work if the CDN is getting DDOS'ed, as in taking forever to return anything.
- zalew 14y agoCame here to say this. Besides, in bigger projects jquery is only a small part of the whole js stack. I've been using these jquery cdns for years, now I just pack it together with everything else uglified. There are so many jquery versions in use around there right now I don't feel I gain anything by caring about the chance that this particular 30kb will be cached by some percentage of users.
- nilliams 14y agoTotally agree, for most production apps using a public CDN for jQuery just isn't worth it. Uglify it with your app and be done with it.
- gavinpc 14y agoAlong the same lines, Chrome (maybe just webkit generally) does not fire DOMContentLoaded until external script requests have resolved or timed out, even if they are async. Also, I don't understand why people feel so strongly about reposting this "document.write" method everywhere, which I found in some cases made my page disappear at load time. You can do the same thing using regular DOM methods, and you get more control over the process.
- youngtaff 14y agoI believe the blocking of DCL is expected behaviour for scripts with async attribute http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#attr-script-async http://www.whatwg.org/specs/web-apps/current-work/multipage/... If you insert the script using a script it's execution is delayed until after DCL
- wyuenho 14y agoAlso related, when is the HTML working group going to introduce a timeout attribute?