1 / 17

High Performance Web Sites Essential Knowledge for Frontend Engineers

High Performance Web Sites Essential Knowledge for Frontend Engineers. Steve Souders souders@google.com http://stevesouders.com/. Disclaimer: This content does not necessarily reflect the opinions of my employer. The Importance of Frontend Performance. 9%. 91%. 17%. 83%.

Download Presentation

High Performance Web Sites Essential Knowledge for Frontend Engineers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. High Performance Web SitesEssential Knowledge for Frontend Engineers Steve Souders souders@google.com http://stevesouders.com/ Disclaimer: This content does not necessarily reflect the opinions of my employer.

  2. The Importance of Frontend Performance 9% 91% 17% 83% iGoogle, primed cache iGoogle, empty cache

  3. Time Spent on the Frontend

  4. The Performance Golden Rule 80-90% of the end-user response time is spent on the frontend. Start there. greater potential for improvement simpler proven to work

  5. 14 Rules • Make fewer HTTP requests • Use a CDN • Add an Expires header • Gzip components • Put stylesheets at the top • Put scripts at the bottom • Avoid CSS expressions • Make JS and CSS external • Reduce DNS lookups • Minify JS • Avoid redirects • Remove duplicate scripts • Configure ETags • Make AJAX cacheable

  6. YSlow High Performance Web Sites

  7. http://conferences.oreilly.com/velocity/20% discount: vel08st

  8. Rule 1: Make fewer HTTP requests CSS sprites combined scripts, combined stylesheets image maps inline images

  9. CSS Sprites size of combined image is less <span style=" background-image: url('sprites.gif'); background-position: -260px -90px;"> </span>

  10. Rule 3: Add an Expires header not just for images

  11. Rule 5: Put stylesheets at the top stylesheets block rendering in IE solution: put stylesheets in HEAD (per spec) avoids Flash of Unstyled Content use LINK (not @import)

  12. Rule 6: Move scripts to the bottom scripts block parallel downloads across all hostnames scripts block rendering of everything below them in the page move scripts as low in the page as possible

  13. Even Faster Web Sites • Split the initial payload • Load scripts without blocking • Don't scatter scripts • Split dominant content domains • Make static content cookie-free • Reduce cookie weight • Minify CSS • Optimize images • Use iframes sparingly • To www or not to www

  14. Why focus on JavaScript? Yahoo! Wikipedia eBay AOL MySpace YouTube Facebook

  15. Live Analysis

  16. Takeaways focus on the frontend run YSlow: http://developer.yahoo.com/yslow Velocity: http://conferences.oreilly.com/velocity/ speed matters you CAN make your site even faster!

  17. Steve Souders souders@google.com http://stevesouders.com/

More Related