Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building Faster Websites

Matt Farina
December 07, 2011

Building Faster Websites

An introduction into components of Web Performance Optimization commonly looked over. This presentation focuses on Front End Performance. It was given at DrupalCamp MI on December 3, 2011.

Matt Farina

December 07, 2011
Tweet

More Decks by Matt Farina

Other Decks in Technology

Transcript

  1. Matt Farina HP Cloud Co-Author of Drupal 7 Module Development

    Core Contributor Over 6.5 Years With Drupal (mfer)
  2. “The web is getting fatter, as much as 25 percent

    fatter in the last year alone.” http://www.webmonkey.com/2011/11/latest-stats-say-were-building-a-fatter-slower-web/
  3. “57 percent of online shoppers will wait three seconds or

    less before abandoning the site” http://www.akamai.com/html/about/press/releases/2010/press_061410.html
  4. “85% of mobile users expect sites to load as fast

    or faster than sites on the desktop.” http://www.strangeloopnetworks.com/resources/infographics/web-performance-and-user-expectations/mobile-device-users-expect-sites-to-load-fast/
  5. “Yahoo! reported that making pages just 400 milliseconds slower resulted

    in a traffic drop of up to 9%.” http://www.slideshare.net/stoyan/yslow-20-presentation
  6. 15% 85% Front End Back End 3% 97% Front End

    Back End Desktop Mobile http://www.readwriteweb.com/hack/2011/06/mobile-page-response.php
  7. Legalities of Minifying GPL • I’m NO Lawyer! This is

    not legal advice. • JS downloaded to the browser is a form of distribution. • The source (non-minified) must be linked to or available. This could be a link in a comment in a minifed file. • Preserve copyright / attribution comments.
  8. # Begin Cache Control <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif

    A604800 ExpiresByType image/png A604800 ExpiresByType image/jpeg A604800 </IfModule> 300 = 5 Minute 3600 = 1 Hour 86400 = 1 DAY 259200 = 3 DAY 604800 = 1 WEEK 2419200 = 1 MONTH 29030400 = 12 MONTH
  9. 10x

  10. Mobile Hardware • Maybe a 1 Ghz mobile processor •

    500 Mb - 1 Gb RAM (shared) • 7 - 90 Million Triangles per Second Drawing
  11. var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-X']); _gaq.push(['_trackPageview']); (function()

    { var ga = document.createElement('script'); ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ga.setAttribute('async', 'true'); document.documentElement.firstChild.appendChild(ga); })(); async var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http:// www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/ javascript'%3E%3C/script%3E")); try{ var pageTracker = _gat._getTracker("UA-1362581-1");pageTracker._trackP ageview(); } catch(err) {} sync