Re:6,953 reasons why I still let Google host jQuery for me
by sounddust on Tuesday September 21, 2010 @04:38PM
(#1714036)
I've thought to myself, "I wish there was a timeout attribute on the <script> tag," about once every few months for the past 10 years. Is there any good reason you can't manually specify how long you want the browser to wait for an external file to load?
[ Parent
| on HN ]
Re:6,953 reasons why I still let Google host jQuery for me
by stellar678 on Wednesday September 22, 2010 @01:02AM
(#1715226)
There's no reason you couldn't code this up in JavaScript:
load jquery from google
- onload, set flag jquery_loaded
settimeout load_locally_if_not_flag 5sec
Re:6,953 reasons why I still let Google host jQuery for me
by toolate on Wednesday September 22, 2010 @08:19AM
(#1715868)
Don't forget that JavaScript is blocking. You'd need to load the jQuery from Google dynamically by inserting script tags.
By the time you've added that, timeouts and fallbacks the amount of inline JS would make hosting jQuery on a CDN pointless.
Re:6,953 reasons why I still let Google host jQuery for me
by blasdel on Tuesday September 21, 2010 @06:11PM
(#1714294)
You can at least control the degree of blocking in the latest Webkit: http://webkit.org/blog/1395/running-scripts-in-webkit/