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

Measuring Web Performance: Metrics & Tools

Measuring Web Performance: Metrics & Tools

The talk was presented on JSUnconf.eu 2017 in Hamburg

Avatar for Michael Geers

Michael Geers

March 25, 2017
Tweet

More Decks by Michael Geers

Other Decks in Technology

Transcript

  1. PAGE WEIGHT • Transferred data • Slow connectivity • Metered

    contracts • Optimisation • Reduce assets • Minify JS & CSS • Active gzip Chrome DevTools
  2. # REQUESTS • Number of assets • Browser only uses

    8 parallel requests per domain • Optimisation • Domain sharding • Bundling & spriting • HTTP/2
  3. CACHABILITY • Local browser cache • Reuse already loaded assets

    • Optimisations • expires / max-age header
 with asset-hashing • etag / last-modified
  4. • Server processing time • Browser waits for HTML •

    Optimisation • Streaming templates Time to First Byte / TTFB
  5. Page Loaded? DOMContentLoaded • Browser finished processing
 the HTML document

    Load • All referenced assets are loaded (img, fonts, ads, tracking, …)
  6. • First Visual Reaction • „Critical Path“ • Optimisation •

    Prioritize assets Time to First Paint https://github.com/sitespeedio/browsertime/blob/master/ browserscripts/timings/firstPaint.js
  7. • Primary Content is Visible • above-the-fold text • e.g.

    product image • „Soft metric“ Time to First Meaningful Paint https://docs.google.com/document/d/ 1BR94tJdZLsin5poeet0XoTW60M0SjvOJQttKT-JK8HI/view#heading=h.yi0gbyc627x1
  8. Network Throttling Chrome DevTools | Netwerk-Tab Firefox | Responsive Design

    Mode Network Link Conditioner | Hardware IO Tools for Xcode
  9. Yahoo YSlow • Calculates a score based on best practices

    • Focuses on network based metrics • Recommends improvements
  10. Google PageSpeed Insights • Analyses rendering • Critical path •

    SEO relevant • Cons • Not open source (any more) • Google API-Key required • Pre-RWD • Aggressive mobile rules
  11. WebPageTest • Father of the SpeedIndex • Solid results •

    Records video • Online results • Cons • Confusing user interface • Messy selfhosting
 (Windows) https://www.webpagetest.org/
  12. sitespeed.io • Docker based (selfhosting) • Visual Metrics • Modular

    • Accessibility Rules • CI & Metric Integration • Cons • might contain bugs https://www.sitespeed.io/
  13. Google Lighthouse • Chrome Extension • Command Line Tool •

    Visual Metrics • First Meaningful Paint • Interaction-Metrics • Estimated Input Latency • Progressive Enhancement https://developers.google.com/web/tools/lighthouse/
  14. Real User Monitoring • Measuring inside the users browser •

    real device distribution • real browser distribution • real connectivity situations
  15. boomerang.js • Collects metrics in the browser • Started by

    Yahoo! <script src="boomerang/boomerang.js" /> <script> BOOMR.init({ beacon_url: "/logging" }); </script> https://github.com/SOASTA/boomerang
  16. Facebook 2G Tuesday • Slowdown to 2G speed for 2

    hours • Opt-in dialogue the Facebook app http://www.businessinsider.com/facebook-2g-tuesdays-to-slow-employee-internet-speeds-down-2015-10?IR=T