SlideShare a Scribd company logo
Making Mobile Sites Faster
@andydavies
#Port80, May 2013
http://www.flickr.com/photos/b-tal/156919562
Imagine… later today…
http://www.flickr.com/photos/andrew_bolin/3909446250
How long would you wait here?
http://www.flickr.com/photos/oatsy40/6198212129
Some of this advice will expire
http://www.flickr.com/photos/21560098@N06/7127570205
http://www.flickr.com/photos/szene/8220511232
So many devices… lots of variation
Differing Network Environments
GPRS EDGE 3G 4G WiFi
Faster, Lower Latency???
Special networks…
Conference, Hotel & Coffee shop WiFi
Latency is a huge issue
“In 2012, the average worldwide RTT to
Google is still ~100ms, and ~50-60ms within
the US.”
http://www.igvita.com/2012/07/19/latency-the-new-web-performance-bottleneck/
“we are looking at 100-1000ms RTT range
on mobile”
Ilya Grigorik
3G Radio Resource Control
http://web.eecs.umich.edu/~fengqian/paper/3g_imc10.pdf
IDLE CELL_FACH
CELL_DCH Idle for 5s
Idle for 12s
1-2s delay!
Exact timings vary and depend on carrier NOT device
1s delay
http://www.flickr.com/photos/fastjack/2943793818
It’s not just about speed
Some things block
http://www.flickr.com/photos/timo/3995227
http://www.flickr.com/photos/wiertz/6922984303
What’s needed to render the page?
Fast mobile sites have short waterfalls
Do you deploy your CSS like this?
<link href="screen.core.css" />
<link media="(min-width: 320px)" href="s320.css" />
<link media="(min-width: 480px)" href="s480.css" />
<link media="(min-width: 750px)" href="s750.css" />
<link media="(min-width: 960px)" href="s960.css" />
Do you really need that font?
http://www.flickr.com/photos/symphoney/76513801
And what about those scripts?
http://www.flickr.com/photos/alikins/4439062727
Remember GZIP and Caching
http://www.flickr.com/photos/_flood_/6732863457
Re-Use TCP Connections - HTTP Keep-Alive
(HTML5 Boilerplate has example settings for Apache)
Orange segments are
new TCP connections
being opened
Beware of Redirects
367ms and still no HTML!
Set a cache lifetime and make them private
#OneLessJPG
Misquoted a lot recently, original quote
refers to relative sizes of JS libraries
Images
Scripts
Stylesheets
Other
HTML
Images are 70% of an ‘average’ mobile site
http://mobile.httparchive.org
Time to bury bitmapped images?
http://www.flickr.com/photos/tonyjcase/7183556158
Use vector graphics instead?
SVG: 12 KB vs PNG: 86KB
Heydings by Heydon Works
Icon fonts
&#x2605; ★
&#x2665; ♥
&#x2601; ☁
“Bog Standard Font”
&#x2606; ☆
Use CSS
border-radius: 20px;
background: linear-gradient(left, #f06, #ff0);
Some combinations produce poor paint performance
What if only a bitmap image will do?
http://www.flickr.com/photos/orkomedix/5026054826
Size images for the viewport
http://www.flickr.com/photos/emzee/139794246
Proposed srcset attribute
http://www.w3.org/html/wg/drafts/srcset/w3c-srcset/
<img src="beach-desktop.jpeg"
srcset="beach-mobile.jpeg 720w
beach-tablet.jpeg 1280w"
alt="The beach is gorgeous.">
image-set() is CSS equivalent
Compressive Images (experimental)
Double the dimensions but lower the quality
As images get smaller need to focus on subject
“Art Direction” - Jason Grigsby
http://www.flickr.com/photos/barackobamadotcom/5795228030
<picture>
<source media="(min-width: 45em)" src="large.jpg">
<source media="(min-width: 18em)" src="med.jpg">
<source src="small.jpg">
<img src="small.jpg" alt="">
<p>Accessible text</p>
</picture>
Proposed picture element
http://www.w3.org/TR/html-picture-element
Cache-Control: no-transform
Stop proxies recompressing your images
Unclear how many proxies follow the standard
Do you really want to do it by hand?
Can adapt format for visitor e.g.WebP
Automate generate image versions
http://www.flickr.com/photos/skrubu/4962771959
- CMS
- Scripts
- CDNs
- Dedicated services
We’re adapting on the client-side
http://seesparkbox.com
But we shouldn’t forget about the server
http://www.flickr.com/photos/getbutterfly/6317955134
device
width
Client Hints HTTP Header (proposed)
http://tools.ietf.org/html/draft-grigorik-http-client-hints-00
CH: dh=598, dw=384, dpr=2.0
device
height
device
pixel
ratio
! "ipinfo": {
! ! "ip_address":"212.183.128.252",
! !"ip_type":"Mapped",
! !"Network": {
! !! "organization":"vodafone limited",
! ! !"carrier":"vodafone limited",
! ! !"asn":25135,
! ! !"connection_type":"mobile wireless",
! ! !"line_speed":"low",
! ! !"ip_routing_type":"mobile gateway",
! ! !"Domain": {
! ! !! "tld":"net",
! ! !! "sld":"vodafone"
! ! !! }
! ! !},
Quova GeoPoint API
What if we could detect mobile connections?
cache-control: private
&
vary: user-agent
Managing Caching
But loading fast is only the start…
http://www.flickr.com/photos/foodthinkers/4442279870
Facebook artificially slowed down
scrolling from 60fps to 30fps
User Engagement Collapsed
So… what wrecks smoothness?
http://www.flickr.com/photos/18854914@N04/2216950328
“Rendering Without Lumpy Bits”
http://www.flickr.com/photos/marcthiele/8114191496
Don’t just rely on rules… learn how to measure
http://www.flickr.com/photos/chandramarsono/4324373384
http://www.flickr.com/photos/alesimages/4215559895
Thank You!
@andydavies
andy@asteno.com
http://slideshare.net/andydavies
http://www.flickr.com/photos/nzbuu/4093456029

More Related Content

PPT
The Need For Speed
KEY
Speed is Essential for a Great Web Experience
KEY
Sniffing the Mobile Context
PDF
Web Performance Workshop - Velocity London 2013
PDF
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
KEY
Faster Frontends
PDF
Are Today’s Good Practices... Tomorrow’s Performance Anti-Patterns?
PDF
Are Today's Good Practices… Tomorrow's Performance Anti-Patterns
The Need For Speed
Speed is Essential for a Great Web Experience
Sniffing the Mobile Context
Web Performance Workshop - Velocity London 2013
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Faster Frontends
Are Today’s Good Practices... Tomorrow’s Performance Anti-Patterns?
Are Today's Good Practices… Tomorrow's Performance Anti-Patterns

What's hot (20)

KEY
Web Performance - A Whistlestop Tour
PDF
Making Mobile Sites Faster
PDF
The Case for HTTP/2 - Internetdagarna 2015 - Stockholm
PDF
The web is too slow
PDF
Mobile Web Performance - Getting and Staying Fast
PDF
Speed is Essential for a Great Web Experience
PDF
The Case for HTTP/2 - EpicFEL Sept 2015
PDF
Speed is Essential for a Great Web Experience (Digicure - Copenhagen)
PDF
Speed Matters!
PDF
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
PDF
Web Page Test - Beyond the Basics
PDF
What does the browser pre-loader do?
PDF
EdgeConf - Page Load Performance Opening Talk
PPT
Velocity 2010: Performance Impact, Part Two: More Findings from the Front Lin...
PPTX
How fast are we going now?
PDF
Speed is Essential for a Great Web Experience (Canvas Conf Version)
PDF
Stefan Judis "Did we(b development) lose the right direction?"
PDF
Mobile Web Speed Bumps
PPTX
Design+Performance Velocity 2015
PPTX
High Performance Mobile (SF/SV Web Perf)
Web Performance - A Whistlestop Tour
Making Mobile Sites Faster
The Case for HTTP/2 - Internetdagarna 2015 - Stockholm
The web is too slow
Mobile Web Performance - Getting and Staying Fast
Speed is Essential for a Great Web Experience
The Case for HTTP/2 - EpicFEL Sept 2015
Speed is Essential for a Great Web Experience (Digicure - Copenhagen)
Speed Matters!
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Web Page Test - Beyond the Basics
What does the browser pre-loader do?
EdgeConf - Page Load Performance Opening Talk
Velocity 2010: Performance Impact, Part Two: More Findings from the Front Lin...
How fast are we going now?
Speed is Essential for a Great Web Experience (Canvas Conf Version)
Stefan Judis "Did we(b development) lose the right direction?"
Mobile Web Speed Bumps
Design+Performance Velocity 2015
High Performance Mobile (SF/SV Web Perf)
Ad

Similar to Making Mobile Sites Faster (20)

PPTX
Fastandbeautiful belfast
PPTX
Imagesandvideo stockholm webmeetup
PPTX
Imagesandvideo stockholm fastandbeautiful
PDF
Mobile First Responsive Design
PDF
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
PDF
Progressive Enhancement 2.0 (Conference Agnostic)
PDF
Http/2 - What's it all about?
PPTX
Edi react fastandbeautiful
PPTX
Imagesandvideo tallinn
PDF
GTALUG Presentation on CouchDB
PDF
Delivering Responsive Images
PDF
Nobody Wants a Slow Website
PDF
The Big Picture: Responsive Images in Action #scd14
PDF
Optimizing design: a UX practitioners guide
PDF
Now you see me... Adaptive Web Design and Development
PPTX
PyconUK: Fast and Beautiful Images
PDF
Design & Performance - Steve Souders at Fastly Altitude 2015
PDF
That's Web? Extreme Optimization for the Mobile Web (Oct 2012)
PDF
[wvbcn] Adaptive Images in Responsive Web Design
PDF
Christopher Schmitt, "Adaptive Images for Responsive Web Design"
Fastandbeautiful belfast
Imagesandvideo stockholm webmeetup
Imagesandvideo stockholm fastandbeautiful
Mobile First Responsive Design
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Progressive Enhancement 2.0 (Conference Agnostic)
Http/2 - What's it all about?
Edi react fastandbeautiful
Imagesandvideo tallinn
GTALUG Presentation on CouchDB
Delivering Responsive Images
Nobody Wants a Slow Website
The Big Picture: Responsive Images in Action #scd14
Optimizing design: a UX practitioners guide
Now you see me... Adaptive Web Design and Development
PyconUK: Fast and Beautiful Images
Design & Performance - Steve Souders at Fastly Altitude 2015
That's Web? Extreme Optimization for the Mobile Web (Oct 2012)
[wvbcn] Adaptive Images in Responsive Web Design
Christopher Schmitt, "Adaptive Images for Responsive Web Design"
Ad

More from Andy Davies (16)

PDF
Fast Fashion… How Missguided revolutionised their approach to site performanc...
PDF
Fast Fashion… How Missguided revolutionised their approach to site performanc...
PDF
AB Testing, Ads and other 3rd party tags - London WebPerf - March 2018
PDF
AB Testing, Ads and other 3rd party tags - SmashingConf London - 2018
PDF
Inspecting iOS App Traffic with JavaScript - JSOxford - Jan 2018
PDF
Selling Performance - Bristol WebPerf Meetup 2017-07-20
PDF
Speed: The 'Forgotten' Conversion Factor
PDF
Building an Appier Web - London Web Standards - Nov 2016
PDF
Building an Appier Web - Velocity Amsterdam 2016
PDF
The Case for HTTP/2 - GreeceJS - June 2016
PDF
Building an Appier Web - May 2016
PDF
The Fast, The Slow and The Unconverted - Emerce Conversion 2016
PDF
Making Mobile Sites Faster
PDF
Speed matters, So why is your site so slow?
PDF
The Case for HTTP/2
PDF
HTTP2 is Here!
Fast Fashion… How Missguided revolutionised their approach to site performanc...
Fast Fashion… How Missguided revolutionised their approach to site performanc...
AB Testing, Ads and other 3rd party tags - London WebPerf - March 2018
AB Testing, Ads and other 3rd party tags - SmashingConf London - 2018
Inspecting iOS App Traffic with JavaScript - JSOxford - Jan 2018
Selling Performance - Bristol WebPerf Meetup 2017-07-20
Speed: The 'Forgotten' Conversion Factor
Building an Appier Web - London Web Standards - Nov 2016
Building an Appier Web - Velocity Amsterdam 2016
The Case for HTTP/2 - GreeceJS - June 2016
Building an Appier Web - May 2016
The Fast, The Slow and The Unconverted - Emerce Conversion 2016
Making Mobile Sites Faster
Speed matters, So why is your site so slow?
The Case for HTTP/2
HTTP2 is Here!

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Approach and Philosophy of On baking technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
A Presentation on Artificial Intelligence
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation theory and applications.pdf
PPT
Teaching material agriculture food technology
PDF
cuic standard and advanced reporting.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Machine learning based COVID-19 study performance prediction
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation_ Review paper, used for researhc scholars
Approach and Philosophy of On baking technology
“AI and Expert System Decision Support & Business Intelligence Systems”
Reach Out and Touch Someone: Haptics and Empathic Computing
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
A Presentation on Artificial Intelligence
Diabetes mellitus diagnosis method based random forest with bat algorithm
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation
Understanding_Digital_Forensics_Presentation.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation theory and applications.pdf
Teaching material agriculture food technology
cuic standard and advanced reporting.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Machine learning based COVID-19 study performance prediction

Making Mobile Sites Faster