1. Web Performance Domination

    because we can (and should?)

  2. The problem

    JavaScripts (when in great numbers) kill your website's load time!

  3. Some history

    2008: Steve Souders proposes async script loading (stevesouders.com)

  4. Some more history

    2010: Stoyan Stefanov proposes solution for pre-caching JavaScript without executing it (phpied.com)

  5. The solution, in theory

    1. Pre-cache JavaScripts asynchronously
    2. Execute scripts in sequence (preferrably after window.onload)
    3. Scripts not blocking == fastness?
  6. Today

    Several libraries now exist to (almost) solve this:

  7. That's great, but..

    Why don't we just blindly load all JavaScripts asynchronously, execute them synchronously and call it a day?

  8. Web sites are funny

    If we execute scripts after load...

  9. DominateJS

  10. Demo time

  11. Load, DOMContentLoaded, readyState

    DominateJS overrides native DOM methods to ensure that all 'load' handlers get fired eventually.

  12. The document.write menace

    We slapped a JavaScript HTML parser (github.com) on the top. Purrs like a toad.

  13. Current status

  14. Fork it on Github

    Let's make the internet faster! (github.com)

  15. Fin