71. Proxies / Network sniffers
• Charles Proxy
• Fiddler
tools
Image from telerik fiddler
72. Connection simulators
tools
• Network link conditioner (Mac/iOS)
• Charles Proxy
• Clumsy for Windows
• Net Limiter for Windows
• SlowyApp for Mac
• Chrome Developer Tools
77. navigation timing api
Android!
12%
Samsung!
12%
Others!
4%
Windows Phone!
3%
Opera
5%
Safari iOS6/7!
15%
Safari iOS8!
35%
Chrome!
14%
in a few weeks…
79. Resource Timing API
• Information per resource
• Chrome and IE11 only
html5 apis
80. 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
81. 3- tools
- Learn where to test
- Measure loading times
- Measure responsiveness
- HTML5 APIs
!
105. The 14K limit
RTT
• TCP slow start
• Initial congestion window: ~14.6Kb (compressed)
• > 14Kb will create another roundtrip
106. We need to separate
ABOVE THE FOLD (ATF)
content
107. ATF in 1s = 1 RTT ~ < 14Kb
!
!
HTML + CSS + JavaScript
Images?
ATF
108. Avoid JavaScript frameworks
ATF
• Embrace Vanilla JS
• If you really need them, load them after ATF
• Think on alternatives or partial frameworks
109. 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
120. 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
121. After ATF is ready
• Load rest of your content
• Gain experience while rendering ATF:
current performance, screen density, bandwidth
• Make decisions: HD/SD
127. 4- responsiveness & experience
- consistent frame rate
- immediate feedback
- scrolling
- your new enemy
128. consistent fps
Keep framerate high and consistent
• Main UI thread as free as possible
• Avoid repainting (software bitmap calculations)
129. JavaScript
framerate
• Avoid DOM manipulations inside loops/scroll
var e = document.querySelector("#test");
for (var i=0; i<100; i++) {
// change e attributes
});
JAVASCRIPT
157. 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
158. you can reach a good experience
Book signing: firt.mobi/pmw
Wed 10.45am
Office Hours:
Tue 10.45am
twitter: @firt
mobilexweb.com
Pictures)from)freedigitalphotos.net)