Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Design for loading
Search
Swwweet
June 20, 2014
Design
4
410
Design for loading
Presentation by @htmlboy and at WebVisions Barcelona, on June 2014.
Swwweet
June 20, 2014
Tweet
Share
More Decks by Swwweet
See All by Swwweet
Wonders from the Full Stack Fest website
swwweet
1
230
How to be the best web designer in the world.
swwweet
5
1k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
One Size Fits None
swwweet
12
760
One Size Fits None - From the Front 2013
swwweet
2
610
Responsively Responsive
swwweet
23
1.5k
La letra con píxel entra
swwweet
0
990
The future of code
swwweet
4
440
RWD: Dealing with navigation
swwweet
5
390
Other Decks in Design
See All in Design
事業戦略と組織のビジョンデザイン〜デザイン的アプローチで事業・組織づくりにどう取り組んでいるかのリアル〜
jdesign_tokyo
1
380
Designship 2023|想いを可視化するデザインの力
weddingpark
0
240
スタートアップ創業時の CXOのお仕事
tsuyoshika
0
1.5k
業務システムのUX/UI設計ノウハウを解説。デザイナー不在で失敗しないために身につけるべき基本とは?
ncdc
2
280
現象と向き合うデザイン @Spectrum Tokyo Festival 2023
hirokazu_oda
3
1.3k
20240120_画像生成AI_NovelAI入門・情報収集
doradora09
0
110
Installing and Running decksh/pdfdeck
ajstarks
1
490
Sociotechnical design for software and human systems
xinyao
2
490
Ride or Die Animatics
warwatkar
0
140
データ活用に強い、伴走型デザインパートナー「DeC」紹介資料
hopin
0
190
20231122_Design Leader Impact Award_Presentation_FAKE Okazaki
okazakityo
1
250
新しい資産運用サービスALTERNA(オルタナ)の伝え方の工夫
layerx
PRO
0
940
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
187
16k
Designing for Performance
lara
601
67k
Making Projects Easy
brettharned
108
5.5k
A Modern Web Designer's Workflow
chriscoyier
689
190k
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
14
1.6k
Faster Mobile Websites
deanohume
299
30k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
6
1.5k
The Cult of Friendly URLs
andyhume
74
5.7k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
78
42k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
125
32k
Transcript
DESIGN FOR LOADING Javier Usobiaga @htmlboy
None
@HTMLBOY Swwweet.com
How much time does a website need to be
loaded?
How much does it weigh?
THE PROBLEM
“We've remade the Internet in our image… Obese.” –
Jason Grigsby –
The average webpage was 1.46MB in June 2013.
Mostly images. Source: httparchive.org
The average webpage in June 2014 is 1.78MB.
Mostly images. Source: httparchive.org
None
milwaukeepolicenews.com 7MB
grolsch.com 25MB
moto.oakley.com 85MB
Just because we can, it doesn’t mean we should.
None
None
74% of mobile users won’t wait longer than 5 seconds
for a page to load. Source: bit.ly/5secondsmobile
20€/month for 1GB
85MB = 1.70€ 20€/month for 1GB
US roaming: 10€/MB
85MB = 850€ US roaming: 10€/MB
None
None
Consider performance as a design principle.
Set a performance budget.
“Don't make more than 20 http requests.”
“Make the page weigh less than 300KB.”
“1. Optimize an existing feature or asset. 2. Remove an
existing feature or asset. 3. Don’t add the new feature or asset.” – Steve Souders –
How much time does a website need to be
loaded?
None
How much time does a van need to hit
the water when falling from a bridge?
None
INCEPTION TIME
INCEPTION TIME when milliseconds become hours (or never)
How much time does a website need to be
loaded?
How much time does a website need to look
loaded?
Perceived performance
DESIGN FOR LOADING: JS & NAVIGATION
Performance 101: JS belongs at the end of the HTML
“We don't have any non-JavaScript users… No, all your
users are non-JS while they're downloading your JS.” – Jake Archibald –
No JS = No navigation
JS folding = visual glitch
None
None
<div class=container> <header> <!- -Logo and headings- -> </header> <nav>
<!- -Navigation links- -> </nav> <section class=content> <!- -Err… content- -> </section> </div>
.container{display: table;} ! nav{display: table-footer-group;}
None
None
css-tricks.com/snippets/css/a-guide-to-flexbox
DESIGN FOR LOADING: WEB FONTS
FOUT Flash Of Unstyled Text
None
None
None
Consider not using web fonts for body copy.
Choose a fallback with a similar x height.
None
None
Use JS to control the inbetween stages.
github.com/typekit/webfontloader
.wf-loading .wf-active .wf-inactive .wf-<familyname>-<fvd>-loading .wf-<familyname>-<fvd>-active .wf-<familyname>-<fvd>-inactive
Add a timeout to trigger rendering of at least one
font.
WebFontConfig = { google: { families: ['Droid Sans'] }, timeout:
2000 };
Consider a lazy load on the first visit, and
display only cached webfonts.
DESIGN FOR LOADING: IMAGES
The average webpage in June 2014 is 1.78MB.
Mostly images.
Optimize images: ImageOptim JpegMini SVGO
addyosmani.com/blog/image-optimization-tools
Regular JPEG
Progressive JPEG
But… what happens before the image is downloaded?
FOLOI Flash Of Lack Of Images (duh)
No image = visual glitch
span.main-image{ display: block; min-height: 500px; background: #EEE; }
Min-height = no glitch
DESIGN FOR LOADING: GOING FURTHER
Conditionally load, or avoid: secondary assets third-party content iframes social
plugins
Consider plain links instead of social plugins/iframes.
https://twitter.com/intent/tweet? url=http://bit.ly/ ancientMistery&text=What+is+your+sound? &via=htmlboy Twitter:
http://www.facebook.com/sharer.php? u=http://bit.ly/ancientMistery&t=What+is +your+sound? Facebook: https://plus.google.com/share? url=http://bit.ly/ancientMistery Google+:
Maybe inline critical CSS/JS?
None
None
WRAPPING UP
loading
Browsers won’t wait for every file to be loaded.
Accept that, and design also for loading.
THANKS! @htmlboy ·
[email protected]