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

An introduction to Web Performance

An introduction to Web Performance

A brief introduction to web site performance. What is it, why does it matter and some current data for how well the UC Santa Cruz home page currently performs.

Rob Knight

July 02, 2015
Tweet

More Decks by Rob Knight

Other Decks in Technology

Transcript

  1. –Ilya Grigorik, Google [1] “Performance is not just milliseconds, frames,

    and megabytes. It's also how these ,milliseconds, frames, and megabytes translate to how the user perceives the application.”
  2. A combination of server and content optimizations that result in

    a web page rendering as fast or faster than users expect.
  3. "Google Testing 'Slow To Load' Warning Label In Mobile Search

    Results" –AJ Ghergich https://twitter.com/SEO/status/613350043748319232
  4. How do users behave? –Raelene Wilson [8] "According to Kissmetrics,

    nearly half of web users expect a site to load in two seconds or less, and they tend to abandon sites that don’t load within three seconds. A total of 79 per cent of online shoppers who have trouble with site performance won’t return to the site to buy again and about 44% of them would tell a friend if they had a poor experience shopping online." How do users behave?
  5. Google Analytics, June 1 - July 1, 2015 18% of

    traffic from India to the UCSC homepage comes through proxy web browsers.
  6. – Wikipedia [7] Opera Mini requests web pages through Opera

    Software's servers, which process and compress them before sending them to the mobile phone, speeding up transfer by two to three times and dramatically reducing the amount of data transferred, chargeable on many mobile phone data plans. The pre-processing increases compatibility with web pages not designed for mobile phones. However, interactive sites which depend upon the device processing JavaScript do not work properly. Proxy web browsers
  7. Why does it matter? • While it is only one

    of more than 200 metrics used by Google to assign PageRank, they are considering warning users about slow sites. • Slow-loading sites are quickly abandoned by users, possibly forever. • Access to UCSC sites varies across browsers, devices, networks, and countries.
  8. Why does it matter? Optimizing web performance is a way

    of showing empathy for the user, regardless of the circumstances by which they are trying to access the site. Solve for: • hostile browsers • tiny screens • slow connections
  9. Let's compare UCLA website has 20 more HTTP requests, 200

    more DOM nodes, and is 2x weight of UCSC website. But the user sees content on UCLA.edu 1.5s sooner.
  10. • cache-control: tell the browser it doesn't need to re-

    download this file until [some future date]. • connection: keep the connection between the browser and the server open for additional requests. • gzip: tell the server to zip text files (html, css, javascript) before sending them to the browser to reduce file size in transit. • expires: tell the browser a future date when it should request a new version of this file. HTTP Headers
  11. cache-control: coming soon connection: coming soon gzip: Already doing this

    on static.ucsc.edu; coming soon to other sites expires: coming soon Progress on ucsc.edu
  12. Images reduce image file size: developer does this responsive images:

    someday? lazy-load billboard images: coming soon lazy-load images below the fold: someday?
  13. Scripts & Styles compress: we remove whitespace and comments from

    .js and .css files concatenate javascript: not yet move scripts to footer: not yet async javascript files: someday?
  14. Scripts & Styles compress: we remove whitespace and comments from

    .js and .css files concatenate javascript: not yet move scripts to footer: not yet async javascript files: someday? Images reduce image file size: developer does this responsive images: someday? lazy-load billboard images: coming soon lazy-load images below the fold: someday? cache-control: coming soon connection: coming soon gzip: Already doing this on static.ucsc.edu; coming soon to other sites expires: coming soon HTTP Headers
  15. How do I get started? 1. Test 2. Low-hanging fruit

    (server-side config) 3. Image sizes 4. Static asset size, order 5. Rinse, repeat
  16. Link-o-rama! 1. Speed, Performance, and Human Perception by Ilya Grigorik

    2. Faster Mobile Websites by Dean Hume 3. How fast is fast enough? by Tammy Everts 4. Critical rendering path by Patrick Sexton 5. PageSpeed Insights by Google 6. Design+Performance by Steve Souders 7. Opera Mini (Wikipedia) 8. Why Trying to Get 95+ on Google PageSpeed Insights for Your WordPress Site Will Drive You Mad! by Raelene Wilson 9. Infographic: Loading Time by Kissmetrics 10. Even Faster Websites by Steve Souders