Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Anatomy of a responsive page load, Responsive D...
Search
Andy Hume
March 01, 2013
Technology
23
3.3k
Anatomy of a responsive page load, Responsive Day Out 2013
Make content appear fast on the screen. Presentation from Responsive Day Out 2013
Andy Hume
March 01, 2013
Tweet
Share
More Decks by Andy Hume
See All by Andy Hume
Architecting resilient front-ends, jQuery UK, 2015
andyhume
2
1.1k
Building for performance and resilience
andyhume
5
1.1k
Architecting resilient front ends
andyhume
3
800
Guardian Responsive Design, SmashingConf 2013
andyhume
6
620
Web Fonts as a Progressive Enhancement, Ampersand 2013
andyhume
2
740
Anatomy of a responsive page load, WhiskyWeb 2013
andyhume
10
1.8k
Breaking News & Breaking Software, SyncConf 2013
andyhume
0
250
Responsive Guardian
andyhume
21
1k
CSS for grown ups: maturing best practises, SXSW 2012
andyhume
101
47k
Other Decks in Technology
See All in Technology
MediaPipe と ML Kit ってどう ちがうの? / What is the difference between MediaPipe and ML Kit?
yanzm
0
150
Yahoo! JAPANトップページにおけるマイクロフロントエンド - 大規模組織におけるFE開発を加速させるには
lycorptech_jp
PRO
0
1.7k
累計2500万着電を支える大規模 電話自動応答サービスのアーキテクチャ / Architecture of a Large-Scale Automated Phone Response Service Supporting 25 Million Cumulative Calls
ymachida
8
4.1k
データカタログを自作したけど 運用しなかった話@Findy Lunch LT「データカタログ 事例から学ぶメタデータ管理の実態」
ryo_suzuki
2
400
LINEヤフーにおける超大規模プラットフォーム実現への挑戦と学び / Challenges and Lessons in Building an Ultra-Large-Scale Platform at LY Corporation
hhiroshell
1
840
GAS × Discord bot × Gemini で作ったさいきょーの情報収集ツール
ysknsid25
1
330
TypeScript100%で作るMovable Typeプラグイン
usualoma
2
250
4年で17倍に成長したエンジニア組織を支えるアーキテクチャの過去と未来
sansantech
PRO
1
4.6k
間違いだらけのポストモーテム - ホントに役立つレビューはこうだ!
jacopen
5
790
LLMを「速く」「安く」 動かすには / CloudNative Days Winter 2024
pfn
PRO
4
1.2k
JAWS UG 青森(弘前)クラウド・AWS入門
hiragahh
0
170
Next.jsとNuxtが混在? iframeでなんとかする!
ypresto
3
2.4k
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
280
34k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
1
210
Product Roadmaps are Hard
iamctodd
PRO
49
11k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Building Adaptive Systems
keathley
38
2.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Optimizing for Happiness
mojombo
376
70k
Adopting Sorbet at Scale
ufuk
73
9.1k
The Cost Of JavaScript in 2023
addyosmani
45
6.9k
Transcript
PAGE LOAD Andy Hume THE ANATOMY OF A Responsive Day
Out, 2013 RESPONSIVE
Text
Content-Encoding: gzip Cache-Control: max-age=315360000
Content-Encoding: gzip Cache-Control: max-age=315360000 OK. NOW WE CAN TALK
http://www.flickr.com/photos/freefoto/2231356418/ Performance
page load time PERFORMANCE bandwidth use battery life server capacity
fast interface reliability
page load time PERFORMANCE page load time bandwidth use battery
life server capacity fast interface reliability
Content THREE STAGES Enhancement Leftovers
Content THREE STAGES Enhancement Leftovers
Content THREE STAGES Enhancement Leftovers
Content THREE STAGES Enhancement Leftovers
Content Enhancement Leftovers
Content Enhancement Leftovers
Content Enhancement Leftovers
Content Enhancement Leftovers
Content Enhancement Leftovers DOMContentReady event
Content Enhancement Leftovers DOMContentReady event Load event
NO. 1 TRADE OFF http://www.flickr.com/photos/funkypancake/477244177/ Trade-off: Script loading
SCRIPT LOADING <script> var script = document.createElement('script'); script.src = "app.js";
document.head.appendChild(script); </script>
SCRIPT LOADING <script src="app.js" async defer></script>
SCRIPT LOADING appendChild(script) <script async> HTML CSS JAVASCRIPT HTML CSS
JAVASCRIPT
DOMContentReady event Load event Content Enhancement Leftovers
DOMContentReady event Load event Content Enhancement Leftovers
<script> if (isModernBrowser()) { var s = document.createElement('script'); s.src =
"app.js"; document.head.appendChild(script); } </script> CUTTING THE MUSTARD
DOMContentReady event Load event Content Enhancement Leftovers
@if(isModernBrowser) { <script src="app.js" async defer></script> } CUTTING THE MUSTARD
DOMContentReady event Load event Content Enhancement Leftovers
DOMContentReady event Load event Content Enhancement Leftovers
http://www.flickr.com/photos/number10gov/4600963461/ Trade-off: CSS download
CSS DOWNLOAD <link href="main.css" rel="stylesheet" /> <!-- For larger viewports
--> <link href="larger.css" media="screen and (min-width: 350px)" rel="stylesheet" />
CSS DOWNLOAD <link href="main.css" rel="stylesheet" /> @if(isWideDevice()) { <link href="larger.css"
media="screen and (min-width: 350px)" rel="stylesheet" /> }
RESPONSIVE SERVER
RESPONSIVE SERVER Relies on device detection DeviceAtlas, WURFL RESS
NO. 3 ( 4) TRADE OFF http://www.flickr.com/photos/harikrishnanb/4264996356/ Trade-off: Web fonts
http://www.flickr.com/photos/spacemanbob/1084139169/ Web fonts
FONT LOADING Progressive enhancement
FONT LOADING Progressive enhancement Cuts the mustard
FONT LOADING Progressive enhancement Cuts the mustard Supports WOFF
FONT LOADING Progressive enhancement Cuts the mustard Supports WOFF localStorage
available
PRE-RENDER CUT THE MUSTARD? NO FONTS SHOW FONTS NO NO
SUPPORT WOFF? FONTS IN STORAGE? NO
POST-RENDER STORAGE AVAILABLE? NO FONTS SHOW FONTS NO DOWNLOAD FONTS:
BASE64 ENCODED IN JSON CACHE FONTS IN STORAGE
POST-RENDER STORAGE AVAILABLE? NO FONTS SHOW FONTS NO DOWNLOAD FONTS:
BASE64 ENCODED IN JSON CACHE FONTS IN STORAGE
http://www.flickr.com/photos/zigazou76/4412946911/ Trade-off: Images
RESPONSIVE IMAGES
Why media queries? THE FUTURE Modules, patterns, systems, components, OOCSS,
SMACSS, Standalone Viewport is irrelevant
Why media queries? THE FUTURE Modules, patterns, systems, components, OOCSS,
SMACSS, Standalone Viewport is irrelevant
RESPONSIVE IMAGES <picture alt="Describes the image."> <source src="s.jpg"> <source media="(min-width:320px)"
src="m.jpg"> </picture>
RESPONSIVE IMAGES <div data-alt="Describes the image." data-src="small.jpg" data-src-high="large.jpg" data-width="180" data-height="100"
> </div>
None
None
PERFORMANCE RESPONSIVE
PERFORMANCE
Thank-you! http://lanyrd.com/scdtfx @andyhume Creative Commons Licensed Attribution, Non-Commercial, Share Alike
cc