Modernizr/Modernizr — Issue #390: Modernizr.load/yepnope fails to execute if file loads too slow
Author: JorritSalverda
Created: 2011-10-14 11:51:53+00:00
State: open

When throttling download speeds I've encountered a bug where the javascript loaded with modernizr.load doesn't get executed. To narrow down the error I've created the following html:

The SlowLoadingJavasript.js is some 150kbyte large, and the connection speed throttled to 256kbit/s and lower. When the download speed is throttled until loading the javascript takes at least 10 seconds to load it stops to execute. Switching modernizr for the newest version of yepnope doesn't change things.

I've tested it in Chrome 14.0.835.202 m and in Firefox 7.0.1, but it also happens on all IE versions.

In both Firebug and Chrome devtools the second load doesn't show up any longer.

As soon as the file comes from cache - which it does on second page load - it does execute.