Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stevesouders.com/docs/sfjs-20120112.pptx Disclaimer: This content does not necessarily reflect the opinions of my employer.

Similar presentations


Presentation on theme: "Stevesouders.com/docs/sfjs-20120112.pptx Disclaimer: This content does not necessarily reflect the opinions of my employer."— Presentation transcript:

1 stevesouders.com/docs/sfjs pptx Disclaimer: This content does not necessarily reflect the opinions of my employer.

2 CuzillionSpriteMe YSlow Hammerhead

3

4 What’s the #1 cause of slow web pages?

5 JAVASCRIPT!

6

7

8 all requests containing “.js” are skipped

9

10 1995: scripts in HEAD blocks other downloads (IE 6-7, images in IE, iframes) downloaded sequentially (IE 6-7) blocks rendering during download & parse-execute

11 2007: move scripts to bottom... doesn’t block other downloads downloaded sequentially in IE 6-7 blocks rendering during download & parse-execute

12 2009: load scripts async var se = document.createElement(‘script’) ; se.src = ‘a.js’; document.getElementsByTagName(‘he ad’)[0].appendChild(se); doesn’t block other downloads downloaded in parallel (all browsers) blocks rendering during parse-execute

13 2010: async + on-demand exec var se = new Image(); // Object se.onload = registerScript; se.src = ‘a.js’; separate download from parse-execute doesn’t block other downloads downloaded in parallel (all browsers) doesn’t block rendering until demanded

14 20??: markup

15

16

Ads by Google