Top Banner
Page Load Optimization
30

Page load optimization

Apr 14, 2017

Download

Documents

Aditya Manohar
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Page load optimization

Page Load Op t i m i za t i on

Page 2: Page load optimization

W hat we wi l l ta lk abou t ...

Page 3: Page load optimization

CACH IN G

a s se t c omp re s s i on

m in i f i ca t i on

{[ST RUCTU RE] - [ P RESENTAT ION] - [B EHAVIOR]

sp r i te si mage op t i m i za t i on

h ead e r s

c on te n t o rgan i za t i on la zy - load

<MARKUP>

CSS vs JSETags

Page 4: Page load optimization

T he Pa re to P r i nc i p le (T he 80 -20 r u le)

...and why i t d oe sn ' t r e a l ly app ly

Page 5: Page load optimization

T he f i r s t 20%

T he s i gn i f i can t 80%

Page 6: Page load optimization

...b i gge s t i mpac t, e a s i e s t to f i x

HTTP Reque s t s

Page 7: Page load optimization

“How ?”, yo u a sk ...

CSS

JS

COMB INE

IMAGES

YU I Comp re s sor - JSMin - M i n i f y

Page 8: Page load optimization

Min im i ze r eque s t ove r h e ad...

Enab le HTTP keepa l i ve s...

gz ip c on te n t to m i n i m i ze p ay load...

Page 9: Page load optimization

“P ip e l i n i ng ! ! !..”, yo u s h o u t...

Courtesy of en.wikipedia.org – HTTP Pipelining

Page 10: Page load optimization

Se rve s ta t i c c on te n t f r om a s se t se rve r s...

w i t h up to 4 d i f f e r e n t c ookie - le s s CNAMES...

Page 11: Page load optimization

Cac h i ng - w i t h o u t

Page 12: Page load optimization

Cac h i ng - w i t h

Page 13: Page load optimization

How d ' ya d o t h a t ??...

## httpd.conf

<Location /assets>

SetOutputFilter DEFLATE # mod_deflate

ExpiresActive On #mod_expires

ExpiresDefault "access plus 1 month"

FileETag MTime Size #core

</Location>

Page 14: Page load optimization

Cookie s - Le s s i s more

Page 15: Page load optimization

W hy ??

Page 16: Page load optimization

Cookie s ad d we i g h t ...w i t h eve ry r eque s t

Page 17: Page load optimization

W hat d o I d o ?? ! !

Page 18: Page load optimization

Keep ' e m l i g h t ! !...

Se t t h e m a t an app rop r i a te d oma in leve l...

Se t an app rop r i a te exp i ry d a te...

Page 19: Page load optimization

I mage s

Caugh t be tween t h e d evi l and t h e d eep b l ue se a...

Page 20: Page load optimization

.g i f

.jp e g

.p ng

Sp o i l t f o r c h o i c e ?...

Page 21: Page load optimization

And t h e w i nne r i s...

Page 22: Page load optimization

Op t im i z i ng Image s

Red und an t c h unks

App l i ca t i on me tad a ta

EX IF d a ta

Com men t s

Conve r t

Page 23: Page load optimization

And t h e ba t t le c on t i n ue s...

vs.

P rog re s s i ve B ase l i ne

Page 24: Page load optimization

Squeaky c le an ma rkup...

Page 25: Page load optimization

Fo l lowing HTTP se man t i c s...

Page 26: Page load optimization

Dep loy t h a t s i l ly favi c on. i c o...

“Huh ?? ! ! !.... Wha t ??....”

Page 27: Page load optimization

“He l lo t ran sp a renc ie s ! ! !...”

No...No...No t aga i n ! ! !

Page 28: Page load optimization

AJAX GET vs POST...

Page 29: Page load optimization

CSS a t t h e top...JS a t t h e bo t tom...b la h...b la h

Page 30: Page load optimization

f i n

ad i tya.mano ha r@gma i l.c om