SlideShare a Scribd company logo
1 of 34
Cologne Web Performance Optimization Meetup #34
Core Web Vitals
Optimizing Speed and Usability
for Google's Core Web Vitals
Thanks to wao.io by Avenga for supporting the event!
Ingo Steinke
Creative Web Developer
Cologne Web Performance Optimization Meetup #34
Ingo Steinke
Creative Web Developer,
Web Performance Expert,
freelancer @ planted.green
co-hosting @cgnWebPerf
ingo-steinke.com
@fraktalisman
Cologne Web Performance Optimization Meetup #34
Core Web Vitals
Optimizing Speed and Usability
for Google's Core Web Vitals
Thanks to wao.io by Avenga for supporting the event!
Ingo Steinke
Creative Web Developer
Core Web Vitals: Web Performance and Usability
“Web Vitals is an initiative by Google to provide unified
guidance for quality signals that are essential to
delivering a great user experience on the web. Core Web
Vitals are the subset of Web Vitals that apply to all web
pages, should be measured by all site owners, and will
be surfaced across all Google tools.”
web.dev/vitals/#core-web-vitals
Cologne Web Performance Optimization Meetup #34
Core Web Vitals: Web Performance and Usability
What's new anyway?
Why the hype?
“Most performance advice is the same we already knew,
or should have known, unless we never cared about
usability and only ever optimized for Time-to-First-Byte?”
Cologne Web Performance Optimization Meetup #34
Core Web Vitals: Web Performance and Usability
LCP: Largest Contentful Paint, FID: First Input Delay, CLS: Cumulative Layout Shift
Cologne Web Performance Optimization Meetup #34
TBT
Total Blocking Time
Core Web Vitals: Web Performance and Usability
Measuring and Monitoring Web Vitals
● PageSpeed Insights
● Lighthouse
● WebPageTest
● GTMetrix
● Google Search Console
Cologne Web Performance Optimization Meetup #34
Core Web Vitals: Web Performance and Usability
Cologne Web Performance Optimization Meetup #34
PageSpeed Insights:
Core Web Vitals: Web Performance and Usability
Cologne Web Performance Optimization Meetup #34
Lighthouse:
Core Web Vitals: Web Performance and Usability
Measuring Core Web Vitals: WebPageTest
Cologne Web Performance Optimization Meetup #34
Core Web Vitals: Web Performance and Usability
Measuring Core Web Vitals: GTMetrix
Cologne Web Performance Optimization Meetup #34
Core Web Vitals: Web Performance and Usability
Monitoring Core Web Vitals: Google Search Console
Cologne Web Performance Optimization Meetup #34
Core Web Vitals: Web Performance and Usability
LCP: Largest Contentful Paint, FID: First Input Delay, CLS: Cumulative Layout Shift
Cologne Web Performance Optimization Meetup #34
TBT
Total Blocking Time
Core Web Vitals: Web Performance and Usability
LCP: Largest Contentful Paint
● What does it measure?
● Why does it matter?
● How to optimize?
Cologne Web Performance Optimization Meetup #34
Core Web Vitals: Web Performance and Usability
Largest Contentful Paint measures
interruptions due to waiting
Cologne Web Performance Optimization Meetup #34
From the user's point of view, loading a particular page doesn't represent a
natural break: they haven’t yet achieved their goal, which may make them less
tolerant of delays. The Largest Contentful Paint metric measures when a
page-to-page navigation appears complete to a user.
Aim to keep LCP under 2.5 seconds for 75% of page loads!
blog.chromium.org/2020/05/the-science-behind-web-vitals.html
Core Web Vitals: Web Performance and Usability
Largest Contentful Paint (LCP) vs.
First Contentful Paint (FCP)
Cologne Web Performance Optimization Meetup #34
“First Contentful Paint measures how long it takes for initial DOM content to
render, but it does not capture how long it took the largest (usually more
meaningful) content on the page to render.” (Houssein Djirdeh, Google)
web.dev/optimize-lcp/
Core Web Vitals: Web Performance and Usability
Common Causes for
Poor Largest Contentful Paint
● Slow server response times
● Slow resource load times
● Render-blocking JavaScript / CSS
● Client-side rendering
Cologne Web Performance Optimization Meetup #34
web.dev/optimize-lcp/
Core Web Vitals: Web Performance and Usability
Cologne Web Performance Optimization Meetup #34
Slow Server Response Times
➢ optimize server,
➢ cache assets,
➢ use a CDN,
➢ use resource hints:
preconnect, dns-prefetch
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault
"access plus 5 minutes"
ExpiresByType image/jpeg
"access plus 1 month"
<link rel="dns-prefetch" href="https://fonts.gstatic.com/" >
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
smashingmagazine.com/2019/04/optimization-performance-resource-hints/
Core Web Vitals: Web Performance and Usability
Cologne Web Performance Optimization Meetup #34
<img loading=”lazy”
srcset=”a.jpg b.jpg 2x”
Slow Resource Load Times
➢ optimize, compress, minify
➢ cache
➢ preload, lazy load
➢ responsive images, adaptive serving
navigator.connection.effectiveType // e.g. '4g'
navigator.connection.saveData // data-saver setting
navigator.hardwareConcurrency // CPU core count
navigator.deviceMemory // Device Memory
Core Web Vitals: Web Performance and Usability
Cologne Web Performance Optimization Meetup #34
Render-Blocking Assets
➢ split, inline, minify, defer
.hero-image { background-size: cover; } /* inline critical css */
</style>
<link rel=stylesheet media=screen href="styles.css">
<link rel=stylesheet media=print onload="this.media='screen'" href="later.css">
Use the Coverage tab in Chrome DevTools to find “unused CSS” on your web page.
Remove any unused CSS, or better move it to another stylesheet if used on another
page of your site. Load styles, that are not needed for initial rendering, asynchronously.
Tools: loadCSS, Critical, CriticalCSS, Penthouse, Critters (webpack plugin).
Core Web Vitals: Web Performance and Usability
Cologne Web Performance Optimization Meetup #34
Client-Side Rendering
⚠️ use pre-rendering /
server-side rendering (SSR) ?
“A server-rendered page may look like it can be interacted with,
but it can't respond to any user input until it is “hydrated” (all the
client-side JavaScript has executed). This can make Time to
Interactive (TTI) worse.” (Houssein Djirdeh, Google)
Core Web Vitals: Web Performance and Usability
Cologne Web Performance Optimization Meetup #34
FID: First Input Delay
● What does it measure?
● Why does it matter?
● How to optimize?
Core Web Vitals: Web Performance and Usability
Cologne Web Performance Optimization Meetup #34
First Input Delay (FID) vs.
Time To Interactive (TTI) to
measure low responsiveness
“Time to Interactive measures the time it takes for a page to be fully
interactive, when event handlers are registered for most page elements, and
user interaction is processed within 50ms. First Input Delay is different in that
it’s able to track user input that happens before the page is fully interactive. As
a purely real user metric, it cannot be simulated in a lab test. It requires user
interaction in order to be measured.” (Ziemek Bućko)
onely.com/blog/what-is-first-input-delay/
Core Web Vitals: Web Performance and Usability
Cologne Web Performance Optimization Meetup #34
web.dev/fid/
Input Delay Optimization
➢ optimize JavaScript code
➢ reduce execution time
➢ minimize main thread work
➢ reduce request count and transfer size
➢ (don't) use asynchronous event handling
"would improve the metric but likely make the experience
worse" (Philip Walton)
Core Web Vitals: Web Performance and Usability
Cologne Web Performance Optimization Meetup #34
TBT: Total Blocking Time
● What does it measure?
● Why does it matter?
● How to optimize?
TBT
Total Blocking Time
?
Core Web Vitals: Web Performance and Usability
Cologne Web Performance Optimization Meetup #34
Total Blocking Time (TBT)
as a replacement for FID
TBT
Total Blocking Time
?
“Total Blocking Time is a Lighthouse Performance metric introduced in 2020
that quantifies your page's load responsiveness to user input. In the simplest
terms, TBT measures the total amount of time your webpage was blocked,
preventing the user from interacting with your page. It is one of the Web Vitals
and is a replacement for the field-only First Input Delay metric.”
gtmetrix.com/total-blocking-time.html
Core Web Vitals: Web Performance and Usability
Cologne Web Performance Optimization Meetup #34
CLS: Cumulative Layout Shift
● What does it measure?
● Why does it matter?
● How to optimize?
Core Web Vitals: Web Performance and Usability
Cologne Web Performance Optimization Meetup #34
youtube.com/watch?v=AQqFZ5t8uNc
Cumulative Layout Shift:
“a giant chicken that kicks your content away”
(Addy Osmani)
Core Web Vitals: Web Performance and Usability
Cumulative Layout Shift measures
errors from instability
Cologne Web Performance Optimization Meetup #34
“If an element suddenly moves, your eyes have to find its new position.
Users may end up clicking a link or an ad or a "Buy Now" button unintentionally!
Layout shift significantly disrupts the user's intended journey. Cumulative Layout
Shift measures how frequent and severe unexpected layout shifts are on a page.
Recommended aim for a CLS: less than 0.1 for 75% of page loads.”
https://blog.chromium.org/2020/05/the-science-behind-web-vitals.html
Core Web Vitals: Web Performance and Usability
How to prevent Layout Shift
➢ define image dimensions
➢ reserve fixed height containers for
portals / ads / third-party content
➢ use a hero header
➢ use web fonts properly or not at all
to prevent flash of invisible /unstyled text (FOIT/FOUT)
Cologne Web Performance Optimization Meetup #34
zachleat.com/web/css-tricks-web-fonts/
<img
width=”200”
height=”200”
src=”example.com”
alt=”not shifty”
/>
Core Web Vitals: Web Performance and Usability
Conclusion
What's new anyway?
What’s new if you already optimize your page speed? Not much, unless you haven’t
cared about usability and user experience as well? Care about your users, optimize
time to interactive, and prevent layout shift!
My personal prediction: we as developers and designers should also start to care
about sustainability and reduce our website’s carbon footprint! Hopefully, this might
become another important ranking factor in the future.
Cologne Web Performance Optimization Meetup #34
Core Web Vitals: Web Performance and Usability
Discussion
Cologne Web Performance Optimization Meetup #34
● TBT is the total time of any tasks that take over 50ms. So if you had 3 tasks that take
35ms, 55ms and 80ms the TBT would be 35ms (55-50 and 80 - 50)
● CLS vs. web fonts
○ use variable fonts
○ preload regular font, other (bold, italic) to discover later if needed
○ HTTP Response Header makes browser request it (no server push):
link: <https://example.com/regular.woff2>; rel="preload";
as="font"; type="font/woff2"; crossorigin
● image dimensions vs. art direction and older browsers
○ width height must only put the proper ratio
○ use aspect ratio/intrinsic ratio for the image dimension problem
○ aspect ratio attribute, control by media queries,
○ intrinsic ratio trick with padding-bottom for old devices
○ css-tricks.com/aspect-ratio-boxes/
Core Web Vitals: Web Performance and Usability
Links
This presentation is mostly based on other people's work, mainly by Google's Addy Osmani
and Houssein Djirdeh, but I also owe to the German WordPress community and many more:
Cologne Web Performance Optimization Meetup #34
➔ wpdus.de/meetup-52/ (German)
➔ https://addyosmani.com/
➔ twitter.com/hdjirdeh
➔ web.dev/optimize-lcp/
➔ web.dev/optimize-cls/
➔ web.dev/http-cache/
➔ smashingmagazine.com/2019/04/optimization-performance-resource-hints/
➔ blog.chromium.org/2020/05/the-science-behind-web-vitals.html
➔ developers.google.com/web/fundamentals/performance/get-started/httpcaching-6
➔ dev.to/ingosteinke/optimizing-speed-and-usability-for-google-s-core-web-vitals-1286
➔ zachleat.com/web/css-tricks-web-fonts/
➔ github.com/filamentgroup/loadCSS
➔ github.com/addyosmani/critical
➔ criticalcss.com
➔ github.com/pocketjoso/penthouse
➔ github.com/GoogleChromeLabs/critters
Cologne Web Performance Optimization Meetup #35
Save the date:
Wednesday, 5 May 2021 at 19:00 CET
Online Meetup
Thanks to Avenga Germany and wao.io for Support

More Related Content

What's hot

Core Web Vitals: Google New Ranking Factor
Core Web Vitals: Google New Ranking FactorCore Web Vitals: Google New Ranking Factor
Core Web Vitals: Google New Ranking FactorEneblurConsultingweb
 
Core Web Vitals - Why You Need to Pay Attention
Core Web Vitals - Why You Need to Pay AttentionCore Web Vitals - Why You Need to Pay Attention
Core Web Vitals - Why You Need to Pay AttentionTAC Marketing Group
 
Improve Your Site With A Real-time Core Web Vitals View
Improve Your Site With A Real-time Core Web Vitals ViewImprove Your Site With A Real-time Core Web Vitals View
Improve Your Site With A Real-time Core Web Vitals ViewWP Engine
 
Website Audit Proposal Template PowerPoint Presentation Slides
Website Audit Proposal Template PowerPoint Presentation SlidesWebsite Audit Proposal Template PowerPoint Presentation Slides
Website Audit Proposal Template PowerPoint Presentation SlidesSlideTeam
 
Clickminded SOP Library
Clickminded SOP LibraryClickminded SOP Library
Clickminded SOP LibraryClickMinded
 
Introduction to Web Design
Introduction to Web DesignIntroduction to Web Design
Introduction to Web DesignVictor M. Ortiz
 
Google Analytics for Dummies
Google Analytics for DummiesGoogle Analytics for Dummies
Google Analytics for DummiesTim Lelek
 
Performance Monitoring with Google Lighthouse
Performance Monitoring with Google LighthousePerformance Monitoring with Google Lighthouse
Performance Monitoring with Google LighthouseDrupalCamp Kyiv
 
Web Performance: 3 Stages to Success
Web Performance: 3 Stages to SuccessWeb Performance: 3 Stages to Success
Web Performance: 3 Stages to SuccessAustin Gil
 
Conversion Rate Optimisation: Making The Most of Your Website (Service Networ...
Conversion Rate Optimisation: Making The Most of Your Website (Service Networ...Conversion Rate Optimisation: Making The Most of Your Website (Service Networ...
Conversion Rate Optimisation: Making The Most of Your Website (Service Networ...Marty Hayes
 
Website Analysis Report : SEO, CRO Website Audit.
Website Analysis Report : SEO, CRO Website Audit.Website Analysis Report : SEO, CRO Website Audit.
Website Analysis Report : SEO, CRO Website Audit.Tarak Turki
 
Google Chrome DevTools features overview
Google Chrome DevTools features overviewGoogle Chrome DevTools features overview
Google Chrome DevTools features overviewOleksii Prohonnyi
 
Website Analysis Report
Website Analysis ReportWebsite Analysis Report
Website Analysis ReportAuroIN
 
SEO Audit Report Format
SEO Audit Report Format SEO Audit Report Format
SEO Audit Report Format Pankaj Bisht
 
What is Technical SEO ?
What is Technical SEO ? What is Technical SEO ?
What is Technical SEO ? intern_jaguar
 
Seo Best Practices
Seo Best PracticesSeo Best Practices
Seo Best PracticesKent Schnepp
 

What's hot (20)

Core Web Vitals: Google New Ranking Factor
Core Web Vitals: Google New Ranking FactorCore Web Vitals: Google New Ranking Factor
Core Web Vitals: Google New Ranking Factor
 
Core Web Vitals - Why You Need to Pay Attention
Core Web Vitals - Why You Need to Pay AttentionCore Web Vitals - Why You Need to Pay Attention
Core Web Vitals - Why You Need to Pay Attention
 
Improve Your Site With A Real-time Core Web Vitals View
Improve Your Site With A Real-time Core Web Vitals ViewImprove Your Site With A Real-time Core Web Vitals View
Improve Your Site With A Real-time Core Web Vitals View
 
Website Audit Proposal Template PowerPoint Presentation Slides
Website Audit Proposal Template PowerPoint Presentation SlidesWebsite Audit Proposal Template PowerPoint Presentation Slides
Website Audit Proposal Template PowerPoint Presentation Slides
 
Clickminded SOP Library
Clickminded SOP LibraryClickminded SOP Library
Clickminded SOP Library
 
Technical SEO Audit
Technical SEO AuditTechnical SEO Audit
Technical SEO Audit
 
Introduction to Web Design
Introduction to Web DesignIntroduction to Web Design
Introduction to Web Design
 
Google Analytics for Dummies
Google Analytics for DummiesGoogle Analytics for Dummies
Google Analytics for Dummies
 
Performance Monitoring with Google Lighthouse
Performance Monitoring with Google LighthousePerformance Monitoring with Google Lighthouse
Performance Monitoring with Google Lighthouse
 
Technical SEO.pdf
Technical SEO.pdfTechnical SEO.pdf
Technical SEO.pdf
 
Web Performance: 3 Stages to Success
Web Performance: 3 Stages to SuccessWeb Performance: 3 Stages to Success
Web Performance: 3 Stages to Success
 
Conversion Rate Optimisation: Making The Most of Your Website (Service Networ...
Conversion Rate Optimisation: Making The Most of Your Website (Service Networ...Conversion Rate Optimisation: Making The Most of Your Website (Service Networ...
Conversion Rate Optimisation: Making The Most of Your Website (Service Networ...
 
Seo for-content
Seo for-contentSeo for-content
Seo for-content
 
Website Analysis Report : SEO, CRO Website Audit.
Website Analysis Report : SEO, CRO Website Audit.Website Analysis Report : SEO, CRO Website Audit.
Website Analysis Report : SEO, CRO Website Audit.
 
Google Chrome DevTools features overview
Google Chrome DevTools features overviewGoogle Chrome DevTools features overview
Google Chrome DevTools features overview
 
Website Analysis Report
Website Analysis ReportWebsite Analysis Report
Website Analysis Report
 
SEO Audit Report Format
SEO Audit Report Format SEO Audit Report Format
SEO Audit Report Format
 
What is Technical SEO ?
What is Technical SEO ? What is Technical SEO ?
What is Technical SEO ?
 
SEO Strategy Guide [2019]
 SEO Strategy Guide [2019] SEO Strategy Guide [2019]
SEO Strategy Guide [2019]
 
Seo Best Practices
Seo Best PracticesSeo Best Practices
Seo Best Practices
 

Similar to Optimize Speed and Usability for Google's Core Web Vitals (34 characters

Measuring User on the web with the core web vitals - by @theafolayan.pptx
Measuring User on the web with the core web vitals - by @theafolayan.pptxMeasuring User on the web with the core web vitals - by @theafolayan.pptx
Measuring User on the web with the core web vitals - by @theafolayan.pptxOluwaseun Raphael Afolayan
 
Ahead of the Curve: How 23andMe Improved UX with Performance Edge
Ahead of the Curve: How 23andMe Improved UX with Performance EdgeAhead of the Curve: How 23andMe Improved UX with Performance Edge
Ahead of the Curve: How 23andMe Improved UX with Performance EdgeOptimizely
 
How to prepare for Google's page experience update
How to prepare for Google's page experience updateHow to prepare for Google's page experience update
How to prepare for Google's page experience updateBuiltvisible
 
Web.dev extended : What's new in Web [GDG Taichung]
Web.dev extended : What's new in Web [GDG Taichung]Web.dev extended : What's new in Web [GDG Taichung]
Web.dev extended : What's new in Web [GDG Taichung]Chieh Kai Yang
 
An Introduction to Pagespeed Optimisation
An Introduction to Pagespeed OptimisationAn Introduction to Pagespeed Optimisation
An Introduction to Pagespeed OptimisationPratyush Majumdar
 
How and Why ($) to improve web performance.pdf
How and Why ($) to improve web performance.pdfHow and Why ($) to improve web performance.pdf
How and Why ($) to improve web performance.pdfAndrea Verlicchi
 
Demystifying Web Vitals
Demystifying Web VitalsDemystifying Web Vitals
Demystifying Web VitalsSamar Panda
 
A Designer's Guide to Web Performance
A Designer's Guide to Web PerformanceA Designer's Guide to Web Performance
A Designer's Guide to Web PerformanceKevin Mandeville
 
Rachel Costello — The Landscape of Site Speed and Web Vitals
Rachel Costello — The Landscape of Site Speed and Web VitalsRachel Costello — The Landscape of Site Speed and Web Vitals
Rachel Costello — The Landscape of Site Speed and Web VitalsSemrush
 
Client-side Web Performance Optimization [paper]
Client-side Web Performance Optimization [paper]Client-side Web Performance Optimization [paper]
Client-side Web Performance Optimization [paper]Jakob
 
Core Web Vitals.pptx
Core Web Vitals.pptxCore Web Vitals.pptx
Core Web Vitals.pptxSaraKurian3
 
Keys To World-Class Retail Web Performance - Expert tips for holiday web read...
Keys To World-Class Retail Web Performance - Expert tips for holiday web read...Keys To World-Class Retail Web Performance - Expert tips for holiday web read...
Keys To World-Class Retail Web Performance - Expert tips for holiday web read...SOASTA
 
Understanding and Fixing Core Web Vitals for SEO Results.pdf
Understanding and Fixing Core Web Vitals for SEO Results.pdfUnderstanding and Fixing Core Web Vitals for SEO Results.pdf
Understanding and Fixing Core Web Vitals for SEO Results.pdfWhiteBunnie
 
Browser core red bus presentation
Browser core red bus presentation Browser core red bus presentation
Browser core red bus presentation redBus India
 
CrUx Report and Improving Web vitals
CrUx Report and Improving Web vitalsCrUx Report and Improving Web vitals
CrUx Report and Improving Web vitalsPratyush Majumdar
 
Supercharging Optimizely Performance by Moving Decisions to the Edge
Supercharging Optimizely Performance by Moving Decisions to the EdgeSupercharging Optimizely Performance by Moving Decisions to the Edge
Supercharging Optimizely Performance by Moving Decisions to the EdgeOptimizely
 

Similar to Optimize Speed and Usability for Google's Core Web Vitals (34 characters (20)

Measuring User on the web with the core web vitals - by @theafolayan.pptx
Measuring User on the web with the core web vitals - by @theafolayan.pptxMeasuring User on the web with the core web vitals - by @theafolayan.pptx
Measuring User on the web with the core web vitals - by @theafolayan.pptx
 
Ahead of the Curve: How 23andMe Improved UX with Performance Edge
Ahead of the Curve: How 23andMe Improved UX with Performance EdgeAhead of the Curve: How 23andMe Improved UX with Performance Edge
Ahead of the Curve: How 23andMe Improved UX with Performance Edge
 
How to prepare for Google's page experience update
How to prepare for Google's page experience updateHow to prepare for Google's page experience update
How to prepare for Google's page experience update
 
Web.dev extended : What's new in Web [GDG Taichung]
Web.dev extended : What's new in Web [GDG Taichung]Web.dev extended : What's new in Web [GDG Taichung]
Web.dev extended : What's new in Web [GDG Taichung]
 
An Introduction to Pagespeed Optimisation
An Introduction to Pagespeed OptimisationAn Introduction to Pagespeed Optimisation
An Introduction to Pagespeed Optimisation
 
Web Vitals.pptx
Web Vitals.pptxWeb Vitals.pptx
Web Vitals.pptx
 
How and Why ($) to improve web performance.pdf
How and Why ($) to improve web performance.pdfHow and Why ($) to improve web performance.pdf
How and Why ($) to improve web performance.pdf
 
Demystifying Web Vitals
Demystifying Web VitalsDemystifying Web Vitals
Demystifying Web Vitals
 
Web performance e-book
Web performance e-bookWeb performance e-book
Web performance e-book
 
Designers Guide to Web Performance Yotta 2013
Designers Guide to Web Performance Yotta 2013Designers Guide to Web Performance Yotta 2013
Designers Guide to Web Performance Yotta 2013
 
A Designer's Guide to Web Performance
A Designer's Guide to Web PerformanceA Designer's Guide to Web Performance
A Designer's Guide to Web Performance
 
Rachel Costello — The Landscape of Site Speed and Web Vitals
Rachel Costello — The Landscape of Site Speed and Web VitalsRachel Costello — The Landscape of Site Speed and Web Vitals
Rachel Costello — The Landscape of Site Speed and Web Vitals
 
Lighthouse
LighthouseLighthouse
Lighthouse
 
Client-side Web Performance Optimization [paper]
Client-side Web Performance Optimization [paper]Client-side Web Performance Optimization [paper]
Client-side Web Performance Optimization [paper]
 
Core Web Vitals.pptx
Core Web Vitals.pptxCore Web Vitals.pptx
Core Web Vitals.pptx
 
Keys To World-Class Retail Web Performance - Expert tips for holiday web read...
Keys To World-Class Retail Web Performance - Expert tips for holiday web read...Keys To World-Class Retail Web Performance - Expert tips for holiday web read...
Keys To World-Class Retail Web Performance - Expert tips for holiday web read...
 
Understanding and Fixing Core Web Vitals for SEO Results.pdf
Understanding and Fixing Core Web Vitals for SEO Results.pdfUnderstanding and Fixing Core Web Vitals for SEO Results.pdf
Understanding and Fixing Core Web Vitals for SEO Results.pdf
 
Browser core red bus presentation
Browser core red bus presentation Browser core red bus presentation
Browser core red bus presentation
 
CrUx Report and Improving Web vitals
CrUx Report and Improving Web vitalsCrUx Report and Improving Web vitals
CrUx Report and Improving Web vitals
 
Supercharging Optimizely Performance by Moving Decisions to the Edge
Supercharging Optimizely Performance by Moving Decisions to the EdgeSupercharging Optimizely Performance by Moving Decisions to the Edge
Supercharging Optimizely Performance by Moving Decisions to the Edge
 

Recently uploaded

Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 

Recently uploaded (20)

Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 

Optimize Speed and Usability for Google's Core Web Vitals (34 characters

  • 1. Cologne Web Performance Optimization Meetup #34 Core Web Vitals Optimizing Speed and Usability for Google's Core Web Vitals Thanks to wao.io by Avenga for supporting the event! Ingo Steinke Creative Web Developer
  • 2. Cologne Web Performance Optimization Meetup #34 Ingo Steinke Creative Web Developer, Web Performance Expert, freelancer @ planted.green co-hosting @cgnWebPerf ingo-steinke.com @fraktalisman
  • 3. Cologne Web Performance Optimization Meetup #34 Core Web Vitals Optimizing Speed and Usability for Google's Core Web Vitals Thanks to wao.io by Avenga for supporting the event! Ingo Steinke Creative Web Developer
  • 4. Core Web Vitals: Web Performance and Usability “Web Vitals is an initiative by Google to provide unified guidance for quality signals that are essential to delivering a great user experience on the web. Core Web Vitals are the subset of Web Vitals that apply to all web pages, should be measured by all site owners, and will be surfaced across all Google tools.” web.dev/vitals/#core-web-vitals Cologne Web Performance Optimization Meetup #34
  • 5. Core Web Vitals: Web Performance and Usability What's new anyway? Why the hype? “Most performance advice is the same we already knew, or should have known, unless we never cared about usability and only ever optimized for Time-to-First-Byte?” Cologne Web Performance Optimization Meetup #34
  • 6. Core Web Vitals: Web Performance and Usability LCP: Largest Contentful Paint, FID: First Input Delay, CLS: Cumulative Layout Shift Cologne Web Performance Optimization Meetup #34 TBT Total Blocking Time
  • 7. Core Web Vitals: Web Performance and Usability Measuring and Monitoring Web Vitals ● PageSpeed Insights ● Lighthouse ● WebPageTest ● GTMetrix ● Google Search Console Cologne Web Performance Optimization Meetup #34
  • 8. Core Web Vitals: Web Performance and Usability Cologne Web Performance Optimization Meetup #34 PageSpeed Insights:
  • 9. Core Web Vitals: Web Performance and Usability Cologne Web Performance Optimization Meetup #34 Lighthouse:
  • 10. Core Web Vitals: Web Performance and Usability Measuring Core Web Vitals: WebPageTest Cologne Web Performance Optimization Meetup #34
  • 11. Core Web Vitals: Web Performance and Usability Measuring Core Web Vitals: GTMetrix Cologne Web Performance Optimization Meetup #34
  • 12. Core Web Vitals: Web Performance and Usability Monitoring Core Web Vitals: Google Search Console Cologne Web Performance Optimization Meetup #34
  • 13. Core Web Vitals: Web Performance and Usability LCP: Largest Contentful Paint, FID: First Input Delay, CLS: Cumulative Layout Shift Cologne Web Performance Optimization Meetup #34 TBT Total Blocking Time
  • 14. Core Web Vitals: Web Performance and Usability LCP: Largest Contentful Paint ● What does it measure? ● Why does it matter? ● How to optimize? Cologne Web Performance Optimization Meetup #34
  • 15. Core Web Vitals: Web Performance and Usability Largest Contentful Paint measures interruptions due to waiting Cologne Web Performance Optimization Meetup #34 From the user's point of view, loading a particular page doesn't represent a natural break: they haven’t yet achieved their goal, which may make them less tolerant of delays. The Largest Contentful Paint metric measures when a page-to-page navigation appears complete to a user. Aim to keep LCP under 2.5 seconds for 75% of page loads! blog.chromium.org/2020/05/the-science-behind-web-vitals.html
  • 16. Core Web Vitals: Web Performance and Usability Largest Contentful Paint (LCP) vs. First Contentful Paint (FCP) Cologne Web Performance Optimization Meetup #34 “First Contentful Paint measures how long it takes for initial DOM content to render, but it does not capture how long it took the largest (usually more meaningful) content on the page to render.” (Houssein Djirdeh, Google) web.dev/optimize-lcp/
  • 17. Core Web Vitals: Web Performance and Usability Common Causes for Poor Largest Contentful Paint ● Slow server response times ● Slow resource load times ● Render-blocking JavaScript / CSS ● Client-side rendering Cologne Web Performance Optimization Meetup #34 web.dev/optimize-lcp/
  • 18. Core Web Vitals: Web Performance and Usability Cologne Web Performance Optimization Meetup #34 Slow Server Response Times ➢ optimize server, ➢ cache assets, ➢ use a CDN, ➢ use resource hints: preconnect, dns-prefetch <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 5 minutes" ExpiresByType image/jpeg "access plus 1 month" <link rel="dns-prefetch" href="https://fonts.gstatic.com/" > <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> smashingmagazine.com/2019/04/optimization-performance-resource-hints/
  • 19. Core Web Vitals: Web Performance and Usability Cologne Web Performance Optimization Meetup #34 <img loading=”lazy” srcset=”a.jpg b.jpg 2x” Slow Resource Load Times ➢ optimize, compress, minify ➢ cache ➢ preload, lazy load ➢ responsive images, adaptive serving navigator.connection.effectiveType // e.g. '4g' navigator.connection.saveData // data-saver setting navigator.hardwareConcurrency // CPU core count navigator.deviceMemory // Device Memory
  • 20. Core Web Vitals: Web Performance and Usability Cologne Web Performance Optimization Meetup #34 Render-Blocking Assets ➢ split, inline, minify, defer .hero-image { background-size: cover; } /* inline critical css */ </style> <link rel=stylesheet media=screen href="styles.css"> <link rel=stylesheet media=print onload="this.media='screen'" href="later.css"> Use the Coverage tab in Chrome DevTools to find “unused CSS” on your web page. Remove any unused CSS, or better move it to another stylesheet if used on another page of your site. Load styles, that are not needed for initial rendering, asynchronously. Tools: loadCSS, Critical, CriticalCSS, Penthouse, Critters (webpack plugin).
  • 21. Core Web Vitals: Web Performance and Usability Cologne Web Performance Optimization Meetup #34 Client-Side Rendering ⚠️ use pre-rendering / server-side rendering (SSR) ? “A server-rendered page may look like it can be interacted with, but it can't respond to any user input until it is “hydrated” (all the client-side JavaScript has executed). This can make Time to Interactive (TTI) worse.” (Houssein Djirdeh, Google)
  • 22. Core Web Vitals: Web Performance and Usability Cologne Web Performance Optimization Meetup #34 FID: First Input Delay ● What does it measure? ● Why does it matter? ● How to optimize?
  • 23. Core Web Vitals: Web Performance and Usability Cologne Web Performance Optimization Meetup #34 First Input Delay (FID) vs. Time To Interactive (TTI) to measure low responsiveness “Time to Interactive measures the time it takes for a page to be fully interactive, when event handlers are registered for most page elements, and user interaction is processed within 50ms. First Input Delay is different in that it’s able to track user input that happens before the page is fully interactive. As a purely real user metric, it cannot be simulated in a lab test. It requires user interaction in order to be measured.” (Ziemek Bućko) onely.com/blog/what-is-first-input-delay/
  • 24. Core Web Vitals: Web Performance and Usability Cologne Web Performance Optimization Meetup #34 web.dev/fid/ Input Delay Optimization ➢ optimize JavaScript code ➢ reduce execution time ➢ minimize main thread work ➢ reduce request count and transfer size ➢ (don't) use asynchronous event handling "would improve the metric but likely make the experience worse" (Philip Walton)
  • 25. Core Web Vitals: Web Performance and Usability Cologne Web Performance Optimization Meetup #34 TBT: Total Blocking Time ● What does it measure? ● Why does it matter? ● How to optimize? TBT Total Blocking Time ?
  • 26. Core Web Vitals: Web Performance and Usability Cologne Web Performance Optimization Meetup #34 Total Blocking Time (TBT) as a replacement for FID TBT Total Blocking Time ? “Total Blocking Time is a Lighthouse Performance metric introduced in 2020 that quantifies your page's load responsiveness to user input. In the simplest terms, TBT measures the total amount of time your webpage was blocked, preventing the user from interacting with your page. It is one of the Web Vitals and is a replacement for the field-only First Input Delay metric.” gtmetrix.com/total-blocking-time.html
  • 27. Core Web Vitals: Web Performance and Usability Cologne Web Performance Optimization Meetup #34 CLS: Cumulative Layout Shift ● What does it measure? ● Why does it matter? ● How to optimize?
  • 28. Core Web Vitals: Web Performance and Usability Cologne Web Performance Optimization Meetup #34 youtube.com/watch?v=AQqFZ5t8uNc Cumulative Layout Shift: “a giant chicken that kicks your content away” (Addy Osmani)
  • 29. Core Web Vitals: Web Performance and Usability Cumulative Layout Shift measures errors from instability Cologne Web Performance Optimization Meetup #34 “If an element suddenly moves, your eyes have to find its new position. Users may end up clicking a link or an ad or a "Buy Now" button unintentionally! Layout shift significantly disrupts the user's intended journey. Cumulative Layout Shift measures how frequent and severe unexpected layout shifts are on a page. Recommended aim for a CLS: less than 0.1 for 75% of page loads.” https://blog.chromium.org/2020/05/the-science-behind-web-vitals.html
  • 30. Core Web Vitals: Web Performance and Usability How to prevent Layout Shift ➢ define image dimensions ➢ reserve fixed height containers for portals / ads / third-party content ➢ use a hero header ➢ use web fonts properly or not at all to prevent flash of invisible /unstyled text (FOIT/FOUT) Cologne Web Performance Optimization Meetup #34 zachleat.com/web/css-tricks-web-fonts/ <img width=”200” height=”200” src=”example.com” alt=”not shifty” />
  • 31. Core Web Vitals: Web Performance and Usability Conclusion What's new anyway? What’s new if you already optimize your page speed? Not much, unless you haven’t cared about usability and user experience as well? Care about your users, optimize time to interactive, and prevent layout shift! My personal prediction: we as developers and designers should also start to care about sustainability and reduce our website’s carbon footprint! Hopefully, this might become another important ranking factor in the future. Cologne Web Performance Optimization Meetup #34
  • 32. Core Web Vitals: Web Performance and Usability Discussion Cologne Web Performance Optimization Meetup #34 ● TBT is the total time of any tasks that take over 50ms. So if you had 3 tasks that take 35ms, 55ms and 80ms the TBT would be 35ms (55-50 and 80 - 50) ● CLS vs. web fonts ○ use variable fonts ○ preload regular font, other (bold, italic) to discover later if needed ○ HTTP Response Header makes browser request it (no server push): link: <https://example.com/regular.woff2>; rel="preload"; as="font"; type="font/woff2"; crossorigin ● image dimensions vs. art direction and older browsers ○ width height must only put the proper ratio ○ use aspect ratio/intrinsic ratio for the image dimension problem ○ aspect ratio attribute, control by media queries, ○ intrinsic ratio trick with padding-bottom for old devices ○ css-tricks.com/aspect-ratio-boxes/
  • 33. Core Web Vitals: Web Performance and Usability Links This presentation is mostly based on other people's work, mainly by Google's Addy Osmani and Houssein Djirdeh, but I also owe to the German WordPress community and many more: Cologne Web Performance Optimization Meetup #34 ➔ wpdus.de/meetup-52/ (German) ➔ https://addyosmani.com/ ➔ twitter.com/hdjirdeh ➔ web.dev/optimize-lcp/ ➔ web.dev/optimize-cls/ ➔ web.dev/http-cache/ ➔ smashingmagazine.com/2019/04/optimization-performance-resource-hints/ ➔ blog.chromium.org/2020/05/the-science-behind-web-vitals.html ➔ developers.google.com/web/fundamentals/performance/get-started/httpcaching-6 ➔ dev.to/ingosteinke/optimizing-speed-and-usability-for-google-s-core-web-vitals-1286 ➔ zachleat.com/web/css-tricks-web-fonts/ ➔ github.com/filamentgroup/loadCSS ➔ github.com/addyosmani/critical ➔ criticalcss.com ➔ github.com/pocketjoso/penthouse ➔ github.com/GoogleChromeLabs/critters
  • 34. Cologne Web Performance Optimization Meetup #35 Save the date: Wednesday, 5 May 2021 at 19:00 CET Online Meetup Thanks to Avenga Germany and wao.io for Support