web vitals
play

Web Vitals for a healthier open web Ben Morss Developer Advocate - PowerPoint PPT Presentation

Web Vitals for a healthier open web Ben Morss Developer Advocate DrupalCon Ben Morss Developer Advocate at Google, where I work to help the Web be faster and more beautiful. (And I still sometimes make music) @benmorss 3 12 seconds


  1. Web Vitals for a healthier open web Ben Morss Developer Advocate DrupalCon

  2. Ben Morss Developer Advocate at Google, where I work to help the Web be faster and more beautiful. (And I still sometimes make music) @benmorss

  3. 3

  4. 12 seconds Average mobile web page load on 3G DrupalCon

  5. 40% of mobile connections worldwide are 2G

  6. 6

  7. DrupalCon

  8. DrupalCon

  9. 🔘 bit.ly/web-vitals DrupalCon

  10. DrupalCon

  11. htups://webmasters.googleblog.com/2020/05/evaluating-page-experience.html

  12. Top stories Top stories carousel will be open ● to all pages , provided they meet the Google News Guidelines Page experience will become a ● ranking factor AMP pages will be linked to, ● if available

  13. Web Vitals: What are they? DrupalCon

  14. Pillars of UX Essential metrics for a healthy site Loading Interactivity Visual Stability Is it happening? Is it responsive? Is it stable? contentbazaar.co/20160314/pi-way contentbazaar.co/20160314/pi-way contentbazaar.co/20160314/pi-way Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco DrupalCon

  15. Core Web Vitals (Visual Stability) (Loading) (Interactivity) CLS LCP FID Cumulative Layout Shifu Largest Contentgul Paint First Input Delay NEEDS NEEDS NEEDS GOOD POOR GOOD POOR GOOD POOR IMPROVEMENT IMPROVEMENT IMPROVEMENT 2.5 sec 4.0 sec 100 ms 300 ms 0.1 0.25 75%

  16. DrupalCon

  17. 🔘 web.dev/lcp LCP NEEDS GOOD POOR IMPROVEMENT 2.5 sec 4 sec Measures the render time of the largest content element (image or block of text) visible within the viewporu. DrupalCon

  18. 🔘 web.dev/fjd FID NEEDS GOOD POOR IMPROVEMENT 100 ms 300 ms Measures the time from when a user fjrst interacts with the page until the time when the browser is actually able to respond to that interaction. DrupalCon

  19. 🔘 web.dev/cls CLS NEEDS GOOD POOR IMPROVEMENT 0.1 0.25 Measures the sum of all unexpected layout shifus that occur throughout the lifespan of the page DrupalCon

  20. LCP, FID, CLS are real user measurement (RUM) metrics Event Timing API → First Input Delay → web.dev/fjd Largest Contentgul Paint API → Largest Contentgul Paint → web.dev/lcp Layout Instability API → Cumulative Layout Shifu → web.dev/cls Why these metrics? → bit.ly/web-vitals-science Why X threshold and P75? → bit.ly/web-vitals-methodology DrupalCon

  21. We analyzed millions of page impressions to understand how these metrics and thresholds afgect users. We found that when a site meets the above (Core Web Vitals) thresholds, users are 24% less likely to abandon page loads by leaving the page before fjrst content is painted. Chromium blog: The Science Behind Web Vitals DrupalCon

  22. How do Drupal sites do? DrupalCon

  23. DrupalCon

  24. Web Vitals: Measuring DrupalCon

  25. DrupalCon

  26. Core Web Vitals Now in your favorite tools

  27. 1. DrupalCon

  28. DrupalCon

  29. 2. 🔘 bit.ly/crux-tool DrupalCon

  30. 🔘 g.co/chromeuxdash DrupalCon

  31. 3.

  32. 4. DrupalCon

  33. DrupalCon

  34. 🔘 web.dev/pergormance-scoring 5. DrupalCon

  35. DrupalCon

  36. 🔘 bit.ly/web-vitals-extension 6. DrupalCon

  37. import {getCLS, getFID, getLCP} from 'web-vitals'; // Measure and log each Core Web Vitals. getCLS(console.log); getFID(console.log); getLCP(console.log)

  38. DrupalCon

  39. 🔘 bit.ly/speed-demon-tool DrupalCon

  40. Web Vitals: Improving DrupalCon

  41. DrupalCon

  42. DrupalCon

  43. Images Make them smaller ● choose smaller sizes or compress them ○ Image Optimize, squoosh.app ■ use responsive images ○ Responsive Image ■ lazy load ○ try modules like Lazyload, Blazy ■ DrupalCon

  44. JS & CSS: Less, smaller ● compress ○ minify ○ don't use all modules on all pages ○ Load them later ● use async & defer ○ DrupalCon

  45. DrupalCon

  46. DrupalCon

  47. DrupalCon

  48. <!-- Old best practice --> <img src="shoe.jpg" width="640" height="360" alt="Shoe"> <!-- Then came responsive design practice --> <img src="shoe.jpg" alt="Shoe"> <style> img { width: 100%; /* or max-width: 100%; */ height: auto; } </style> DrupalCon

  49. <!-- Modern best practice --> <!-- set a 640:360 (i.e a 16:9) aspect ratio --> <img src="shoe.jpg" width="640" height="360" alt="Shoe"> DrupalCon

  50. DrupalCon

  51. 🔘 amp-wp.org DrupalCon

  52. DrupalCon

  53. 🔘 web.dev/vitals DrupalCon

  54. Thank you! @benmorss benmorss.com

  55. 🔘 web.dev/vitals

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend