Knowns
- # of HTTP Requests
- # of Bytes
- Images, Animations, Interactions
- Squishiness
- Responsiveness
Unknowns
- Network (latency, bandwidth)
- Hardware (processing power)
- Browser (blocking, features)
Web View
Phone | Cost | RAM | ROM | CPU |
---|---|---|---|---|
Samsung GALAXY S7 | $670 | 4 GB | 32 - 64 GB | 1.6 GHz |
Apple iPhone 6s | $600 | 1 GB | 32 - 128 GB | 1.8 GHz |
LG G5 | $550 | 4 GB | 32 GB | 2.5 GHz |
Huawei Nexus 6P | $550 | 3 GB | 32 - 128 GB | 2.0 GHz |
Samsung Galaxy Note 5 | $700 | 4 GB | 32 - 64 GB | 2.1 GHz |
Sony Xperia | $600 | 2 GB | 16 GB | 1.5 - 2.0 GHz |
Samsung Galaxy S6 | $785 | 3 GB | 32 - 128 GB | 2.1 GHz |
LG Nexus 5X | $580 | 2 GB | 32 GB | 1.8 GHz |
Moto X Pure Edition | $299 | 3 GB | 16 - 64 GB | 1.8 - 2.5 GHz |
Xiaomi Redmi Note 3 | $172 | 2 - 3 GB | 16 - 32 GB | 2 X 1.8 GHz |
Phone | Cost | RAM | ROM | CPU |
---|---|---|---|---|
Nokia Asha 200 | $27 | 32 MB | 10 - 64 MB | FF |
Nokia Asha 210 | $27 | 32 MB | 64 MB | FF |
Nokia X2-01 | $9 | 64 MB | 55 MB | FF |
Nokia C3-00 | $45 | 64 MB | 55 MB | FF |
TECNO P5 | $42 | 512 MB | 4 GB | 1.0 GHz |
Nokia Asha 205 | $27 | 64 MB | FF | |
Nokia Asha 201 | 10 - 32 MB | 64 MB | FF | |
TECNO M3 | $41 | 512 MB | 4 GB | 1.0 GHz |
Infinix Hot Note X551 | $142 | 1 GB | 16 GB | 1.4 GHz |
Infinix Hot 2 X510 | $112 | 1 - 2 GB | 16 GB | 1.3 GHz |
FF = Feature Phone
Java with WAP 2.0/xHTML.
Opera/UC Browser
Running Services | ||
Other | 73MB Avail: 255MB + 182MB in 21 | |
Calendar | 8.4MB | |
Process:com.htc.bgp | ||
ObexService | 31:52:14 | |
Started by application: Touch to stop | ||
AT&T Navigator | 8.4MB | |
Process: com.telnav.app.android.congular | ||
ResoucePreLoader | Restarting | |
Started by application: Touch to stop | ||
AT&T Spots | 2.4MB | |
Process: com.matchboxmobile.wasp | ||
WispService | 31:52:14 | |
Started by application: Touch to stop | ||
Media | 4.1MB | |
Process: android.process.media | ||
DownloadService | 31:52:14 | |
Started by application: Touch to stop | ||
PVWmdrmService | 2.2MB | |
Process: com.pv.wmdrmservice | ||
PVWmdrmService | 31:52:14 | |
Started by application: Touch to stop |
Via OpenSignal
Weight: 143g
Dimension: 138.3 x 67.1 x 7.1mm
OS: iOS 9 (upgrades to iOS 10)
Screen size: 4.7-inch
Resolution: 750 x 1334
CPU: Apple A9 (1.85 GHz dual-core)
RAM: 2GB
Storage: 16*/32/64/128GB
Battery: 1715mAh
Rear camera: 12MP
Front camera: 5MP
Just because no one uses your mobile site, doesn't mean you don't need to improve it. Maybe no one uses it because the experience is awful.
— Dawn Parzych (@dparzych) March 18, 2016
I remember when 3G was primary mobile speed. It was slow but still worked, so why now when my phone says 3G it becomes completely useless.
— Stephen Gundee (@StephenGundee) March 23, 2016
Youtube Feathers:
Regular: 58 requests/1200 kB
Feathers: 14 requests/100 kB
While we control how we build the site, we don't have control over ...
Four phases of interaction: end-user’s perception
Video: How Users Perceive the Speed of The Web (2015): Paul Irish / Google
TTFB = Latency + Server Time
Limit # of handshakes & bandwidth req
TTFB = Latency + Server Time
Limit # of handshakes & bandwidth req
https://developers.google.com/web/tools/lighthouse/
<meta name="viewport" content="width=device-width, ...">
width | width of device's virtual viewport. |
device-width | width of the device's screen. |
height | height of device's virtual viewport |
device-height | height of the device's screen. |
initial-scale | Initial zoom on page visit. default 1.0. |
minimum-scale | If user scalable, as small as it can zoom on the page. |
maximum-scale | If user scalable, maximum amount visitor can zoom on the page. |
user-scalable | Can the web zoom in and out. Values are yes or no. |
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">
Minify and GZip SVG and font files. In that order. See tips for optimising SVG delivery.
Metadata adds bytes and can be a security risk by exposing geographical data. You can Strip EXIF metadata from multiple images at a time.
Serve the smallest image file for the screen size and resolution.
240 x 240 = 57,600 200 x 200 = 40,000 17,600
440 x 440 = 193,600 400 x 400 = 160,000 33,600
640 x 640 = 409,600 600 x 600 = 360,000 49,000
840 x 840 = 705,600 800 x 800 = 640,000 65,600
Scaled: 1,850 milliseconds
Right-sized: 625 milliseconds
blue = CPU used to decode<picture>, <source> & srcset
<picture> <source srcset="large.jpg" media="(min-width: 1000px)"> <source srcset="small.jpg" media="(min-width: 500px)"> <img src="default.jpg" srcset="highresolution.jpg 2x" alt="do not forget the alt"> </picture>
Image types include SVG, GIF, JPEG, PNG, and WebP.
Browser |
Optimal image format |
---|---|
Chrome |
WebP |
IE 9+ / Edge |
JPEG-XR |
Opera |
WebP |
Safari |
JPEG-2000 |
You don't have to change the file extension.
<video .... id="hero-video">
Do you really need a hero video? On a mobile device?
#hero-video { display: none; } @media screen and (min-width: 640px) { #hero-video { display: inherit; } }
navigator.connection.effectiveType
Order from smallest to largest*
<video width="400" height="300" controls="controls"> <!-- WebM: 10 MB --> <source src="video.webm" type="video/webm" /> <!-- MPEG-4/H.264: 12 MB --> <source src="video.mp4" type="video/mp4" /> <!-- Ogg/Theora: 13 MB --> <source src="video.ogv" type="video/ogv" /> </video>* check for quality consistency
<video autoplay="" loop="" muted="true" id="hero-video"> <source src="web_banner.webm" type='video/webm; codecs="vp8, vorbis"'> <source src="web_banner.mp4" type="video/mp4"> </video>
ffmpeg -i original.mp4 -an -c:v copy audiofree.mp4
-an
: Disable audio recording in output.<!DOCTYPE HTML> <html> <head> <meta charset="UTF-8"> <title>Titles are good for SEO</title> <link rel="stylesheet" href="prettyWhenItLoads.css"/> </head> <body> <!-- lots of good content --> <script src="dontBlockHTMLandCSS.js" async defer></script> </body> </html>
CPU Drains the battery. Avoid using it!
requestAnimationFrame()
)Let your device take long, long breaks!
More nodes = more expensive!
Wide / Desktop | Narrow / Mobile | |
---|---|---|
Requests | 77 | 123 |
Assets | 3752kB | 3344kB |
Load | 10.62s | 34.10s |
DOMContentLoaded | 9.74s | 30.94s |
desktop stats | mobile stats |
So, here's the deal:
— failed meme (@SwiftOnSecurity) March 29, 2017
Browsers made a decision to refuse to enable any new advanced speed features, moving forward, for unencrypted websites.
Test during development
Set a budget before you start
Open Web Evangelist & Community Engineer
Blog: standardista.com
Github: github.com/estelle