Script positioning
- bottom for non blocking
- -parallel downloads but images still blocked
Grouping scripts - bundle them in 1 and download 1
Non blocking Scripts - Defer
- Dynamic script elements using onload and readstatechange/readystate
- XMLHttpRequest Script Injection
- only good for files on the server, not from CDN
Recommended non blocking patterns -
- only good for files on the server, not from CDN
- initial code, which creates the scripts and injects
- Lazyload library
$LAB.script('xyz.js').wait(function(){Application.init()})