79. Proxies / Network sniffers
• Charles Proxy
• Fiddler
tools
Image from telerik fiddler
80. Connection simulators
tools
• Network link conditioner (Mac/iOS)
• Charles Proxy
• Clumsy for Windows
• Net Limiter for Windows
• SlowyApp for Mac
• Chrome Developer Tools
89. Resource Timing API
• Information per resource
• Chrome and IE11 only
html5 apis
90. Network information API
html5 apis
• Android Browser, Silk (spec #1) type
• BlackBerry 10, old Firefox (spec #2) bandwidth
• Firefox, Chrome for Android 38+ (spec #3) type
91. 3- tools
- Learn where to test
- Measure loading times
- Measure responsiveness
- HTML5 APIs
116. The 14K limit
RTT
• TCP slow start
• Initial congestion window: ~14.6Kb (compressed)
• > 14Kb will create another roundtrip
117. We need to separate
ABOVE THE FOLD (ATF)
content
118. ATF in 1s = 1 RTT ~ < 14Kb
HTML + CSS + JavaScript
Images?
ATF
119. Avoid JavaScript frameworks
ATF
• Embrace Vanilla JS
• If you really need them, load them after ATF
• Think on alternatives or partial frameworks
120. Careful with Data URI in CSS
ATF
• Images are non-blocking by default
• Using Data URI in CSS creates blocking images
• Use them only on non-ATF external CSS
130. Responsive Web Design
• Using same URL for mobile/desktop still a good a idea
• Mix it with RESS / adaptive web design
• Load media queries CSS async
• Use server-side libraries
• WURFL or DeviceAtlas
131. After ATF is ready
• Load rest of your content
• Gain experience while rendering ATF:
current performance, screen density, bandwidth
• Make decisions: HD/SD
137. 4- responsiveness & experience
- consistent frame rate
- immediate feedback
- scrolling
- your new enemy
138. consistent fps
Keep framerate high and consistent
• Main UI thread as free as possible
• Avoid repainting (software bitmap calculations)
139. JavaScript
framerate
• Avoid DOM manipulations inside loops/scroll
var e = document.querySelector("#test");
for (var i=0; i<100; i++) {
// change e attributes
});
JAVASCRIPT
165. final thoughts
- measure and profile on the real world
- don’t redirect, reduce requests
- atf content in 1s, defer the rest
- be simple, be aggressive
166. you can reach a good experience
firtman@gmail.com
@firt
firt.mobi/mh5 firt.mobi/pmw
50% OFF!