Web Performance Domination
because we can (and should?)
2008: Steve Souders proposes async script loading (stevesouders.com)
Some more history
The solution, in theory
- Execute scripts in sequence (preferrably after window.onload)
- Scripts not blocking == fastness?
Several libraries now exist to (almost) solve this:
That's great, but..
Web sites are funny
If we execute scripts after load...
- Scripts will never hear load events
- Document.write will destroy the page if called late
- Besides destroying your page, Document.write has weird rules
- Started as fork of Steve Souders ControlJS
- Goes all the way across the sky
Load, DOMContentLoaded, readyState
DominateJS overrides native DOM methods to ensure that all 'load' handlers get fired eventually.
The document.write menace
- A lot of pages actually work great (and rez faster)!
- Learning a lot about the DOM (shudder)!
- Complex Google Ads almost working great ;)
Fork it on Github
Let's make the internet faster! (github.com)