Fast, Faster, Fastest - A little journey into website optimization is a presentation given at Fronteers BE which covers the main techniques and tools that can help you achieve the best performance for your website. From various ways to compress images, to writing very efficient CSS, to using cache and compression to your advantage, the slides will explain why front-end optimization is necessary, how it impacts a business and even how big companies use performance perception for their websites.
57. Using .htaccess
Header unset Pragma
FileETag None
Header unset ETag
# cache images for 10 years
<FilesMatch ".(ico|pdf|jpg|jpeg|png|gif)$">
Header set Cache-Control "max-age=315360000, public, must-revalidate"
Header unset Last-Modified
</FilesMatch>
# cache html/htm/xml/txt files for 2 hours
<FilesMatch ".(html|htm|xml|txt|xsl)$">
Header set Cache-Control "max-age=7200, must-revalidate"
</FilesMatch>
this is just an example;
for best results, use HTML5 Boilerplate
64. Specify the jQuery version
for better caching
http://code.jquery.com/jquery-latest.min.js no cache
http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js 1 hour
http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js 1 year
66. Compress only
compressible resources
HTML, CSS, JS, XML, SVG, ICO
use GZIP instead of Deflate
use lowercase for better compression
HTML5 Boilerplate .htaccess recommened
67. e favicon
have one to avoid a 404
load it from a subdomain
compress it
cache it forever
82. Tools & Resources(1 of 2)
Tools
๏ ImageOptim
๏ ImageAlpha
๏ HTML5 Boilerplate
๏ Smush.it - PunyPNG - JPEGmini - PNGGauntlet (Win)
๏ Online YUI Compressor
๏ CSS Sprite Generator - CSSsprite Photoshop script
๏ Page Speed - YSlow
Resources
๏ Akamai Reveals 2 Seconds as the New Threshold of Acceptability for eCommerce Web Page Response Times
๏ How Loading Time Affects Your Bottom Line (Infographic)
๏ For Impatient Web Users, an Eye Blink Is Just Too Long to Wait
๏ Facebook pages that are 500ms slower result in a 3% drop-off in traffic (PDF)
๏ If Google increased page load by 500ms it would cost them 1.2% of their revenue (Video)
๏ Every 100ms of latency costs Amazon 1% of profit
๏ The Performance Golden Rule
83. Tools & Resources(2 of 2)
๏ Most Browsers Allow 6 Concurrent Connections per Hostname
๏ Top 5 Mistakes of Massive CSS (Video + Graphs)
๏ How to create CSS objects? Get the granularity right!
๏ HTTP Compression use by Alexa Top 1000
๏ Profiling CSS for fun and profit. Optimization notes. (CSS3 Performance)
๏ Maximize Your Chances of Caching Your jQuery
๏ Lose the Wait: HTTP Compression
๏ Instagram and Optimizing Favicons
๏ Use Lowercase Markup For Better Compression
๏ Small site? Raise your page load time calculation sample to 100%
๏ The iPhone’s Perceived Performance
๏ The 3 White Lies Behind Instagram’s Lightning Speed
๏ Making a Slow Site Appear Fast