I've opened the developer tools network tab in both Chrome 16 and Firefox 7 on this Cuzillion test page and both appear to show scripts and images being downloaded -all in parallel (can post screen-shots).
I've read that newer browsers can download scripts that are referenced in script tags in parallel with each other. But what this seems to show is even newer browsers actually downloading scripts in parallel with other resources like images.
So do we still need script loaders like LABjs? (My understanding is their entire purpose is to make parallel the downloading of resources so no blocking occurs)
I might just be confused: with http://labjs.com/test_suite/test-script-tags.php Chrome 16 developers tools shows images being downloaded only after the scripts are downloaded. That said, in this case the script tags are in the document's head whereas with the Cuzillion example they are in the body.
So, putting older browsers aside for a moment, are script loaders only relevant if for some reason you need to put your scripts in the document's head?
Script loaders can do much more for you, such as automatically loading dependencies, loading conditionally (polyfills for instance), delayed loading (when needed).
Have a look at yepnope.js and RequireJS for instance (there are many other good loaders around, but those are my browser-side favourites).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With