Current time: 03-04-2021, 07:56 AM Hello There, Guest! (LoginRegister)

Post Reply 
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
yepnope/Modernizr.load - double requests?
04-23-2012, 09:13 PM
Post: #1
yepnope/Modernizr.load - double requests?
Another request for help today, please chaps.

My colleagues are using Modernizr.load and I've been asked to have a look at the results. I'm new to this loader and I must say, from what I have seen, I'm not getting it.

According to the FAQs:

"Q: I'm seeing two requests in my dev tools, why is it loading everything twice?
A: Depending on your browser and your server this could mean a couple different things. Due to the nature of how yepnope works, there are two requests made for every file. The first request is to load the resource into the cache and the second request is to execute it (but since it's in the cache, it should execute immediately). Seeing two requests is pretty normal as long as the second request is cached."

I'm running VRTA and testing in Chrome and FF and it seems pretty clear to me that 2 requests are sometimes being made (IE8 seems OK). I'm nowhere near bottoming out the sometimes.

If I request the same files plus new ones in the complete callback (in a setTimeout some 1000ms later) then the resources already requested are loaded from cache no problem.

It feels like the re-request is happening too quickly i.e. the browser has not yet persisted to cache.

This loader also seems to decide to load serially from time to time.

In the implementation I am looking at, both serial requesting and double requests are manifesting.

Anyone got any experience they could share, please? For various reasons, I really don't want to have to argue this one - much prefer to fight forward.


Find all posts by this user
Quote this message in a reply
09-17-2012, 06:34 AM
Post: #2
RE: yepnope/Modernizr.load - double requests?
What browser are you seeing this behaviour in?

IE7/8 have this behaviour with schema less URLs e.g. // etc.

IE8 also had a bug that produced this behaviour when <meta charset wasn't specified but this was fixed a while ago.


Using WebPageTest -
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

Forum Jump:

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