On Github kmathur7 / web_performance_presentation
pages appear to be loading faster
progressive rendering
prevents blocking of parallel downloads
Easy to read & debug.
Smaller filesize, faster download & execution.
#container li { background: url(sprite_image.png) no-repeat top left; }
.sprite-akamai{ background-position: 0 0; width: 375px; height: 134px; } .sprite-cdnjs{ background-position: 0 -144px; width: 246px; height: 65px; } .sprite-cloudflare{ background-position: 0 -219px; width: 272px; height: 186px; } .sprite-google{ background-position: 0 -415px; width: 360px; height: 88px; }
Browser:
Connects to server and requests page. Server that browser supports gzip "Accept-Encoding: gzip".Server:
No gzip support. Ignores gzip request. Sends uncompressed page.Browser:
Receive page. Display page.Browser:
Connects to server and requests page. Server that browser supports gzip "Accept-Encoding: gzip".Server:
Acknowledges gzip support. Sends gzip encoded page with header "Content-Encoding: gzip".Browser:
Receive page. Decode gzip encoded page based on header "Content-Encoding: gzip". Display page.Available in Firefox & Google Chrome
Provides comments and tips on how to improve performance.