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.

Thanks

Neil

What browser are you seeing this behaviour in?

IE7/8 have this behaviour with schema less URLs e.g. //domain.com/path/resource etc.

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