Current time: 11-26-2020, 02:13 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Challenge: Use redirect pages to pre-load Javascript?
04-02-2011, 12:29 AM (This post was last modified: 04-02-2011 12:29 AM by jesper_mortensen.)
Post: #3
RE: Challenge: Use redirect pages to pre-load Javascript?
I created a few skeleton pages which just load jQuery and jQuery UI from the Google CDN, and tested them with IE8 using WebPageTest.org.

Now, this is hardly a scientific test, but the first impression is that Patrick is spot on -- at least the IE8 case seems to be that the browser jumps to the second page without downloading anything from the first page. I tried using an HTTP 302 header, and a META REFRESH tag (which appeared wonky on IE8, BTW).

So far, the only semi-sane way of doing this that I can see would be to use an async JS loader (like Kyle Simpson's LABjs) to load the JS async & in parallel on the first page, and then issue a JS redirection to the second page. This would be somewhat faster on older browsers which don't support parallel script loading .. and near neutral on modern browsers. However, this method would likely break completely on mobile browsers with poor/buggy JS support.

Patrick's suggestion to use HTML5 LocalStorage has merit too. Actually, after some investigation this seems to be what Google and Bing do for mobile: http://www.stevesouders.com/blog/2011/03...ng-google/

I agree that using LocalStorage is too much work and very little or no benefit for regular sites. I will neither use async JS loader nor LocalStorage for now, both methods seem not to be worth it.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Challenge: Use redirect pages to pre-load Javascript? - jesper_mortensen - 04-02-2011 12:29 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)