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
5
460
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
290
How to be the best web designer in the world.
swwweet
6
1.1k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
One Size Fits None
swwweet
12
810
One Size Fits None - From the Front 2013
swwweet
2
660
Responsively Responsive
swwweet
23
1.6k
La letra con píxel entra
swwweet
0
1.1k
The future of code
swwweet
4
520
RWD: Dealing with navigation
swwweet
5
440
Other Decks in Design
See All in Design
アフォーダンスとシグニファイア
ryokanakai
1
320
【Designship 2024|10.13】デザイン組織を進化させるための仕組み化の要諦
payatsusan213
1
550
ビジョン実現を加速させるデザインプログラムマネージャーの視座とキャリア/ Designship2024_Sato
root_recruit
0
170
PMとデザイナーはニコイチ! メリットと具体的なアクション10選
mosmos_noki
2
1.1k
Personal Story Sequence(WIP) - Younghoon Park
elrns88
0
260
急成長中のWINTICKETにおける ちいさくはじめるライティング改善 / winticket-writing
cyberagentdevelopers
PRO
1
170
Design System for training program
mct
0
130
「ちょっといいUI」を目指す努力 / Striving for Little Big Details
usagimaru
6
3.8k
みんなでブラッシュアップするDesign Sprint_BASE BANKチームの場合
base
PRO
3
640
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
160
(第1回) アーキテクト・テックリード育成講座
masakaya
0
100
Картирование процесса фасилитация стратсессий с Картой гипотез при помощи Карты процесса-опыта
ashapiro
0
400
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
The Cult of Friendly URLs
andyhume
78
6k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
It's Worth the Effort
3n
183
27k
Typedesign – Prime Four
hannesfritz
40
2.4k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Designing Experiences People Love
moore
138
23k
How STYLIGHT went responsive
nonsquared
95
5.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Speed Design
sergeychernyshev
24
610
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]