SlideShare a Scribd company logo
1 of 27
Download to read offline
Pagespeed Optimisation
Pratyush Majumdar
VP - Technology (91Mobiles)
Why Performance Matters - I
A recent study shows that 46% of users won't revisit a website if it has poor
performance and 25% of visitors will abandon a website that takes longer than 4
seconds to load.
A study by Walmart shows that every one-second improvement in website
loading time increases conversion by 2%. If your site visitor stays longer, they are
more likely to convert.
Why Performance Matters - II
● User Experience (Users expect websites to deliver what they want as
quickly as possible)
● Visitor Retention (Visitors won’t revisit a slow site)
● Conversions and Sales (If our visitor stays longer, they are more likely to
convert)
● Brand Image (A well-performing website will leave a good impression)
● SEO (If a website loads quickly, it can rank higher on Google)
Measurement - GTMertix
Measurement - Page Speed Insight
Measurement - Page Speed Insight
Introduction to Core Web Vitals - I
Core Web Vitals is a set of metrics that measure real-world user experience for loading
performance, interactivity, and visual stability of the page.
Largest Contentful Paint (LCP): measures loading performance. To provide a good user
experience, LCP should occur within 2.5 seconds of when the page first starts loading.
First Input Delay (FID): measures interactivity. To provide a good user experience, pages
should have a FID of 100 milliseconds or less.
Cumulative Layout Shift (CLS): measures visual stability. To provide a good user
experience, pages should maintain a CLS of 0.1. or less.
Introduction to Core Web Vitals - II
Google Search Console/Webmaster Console
Page Load Timeline
Structure of a HTML Page
Components of a HTML Page
<!DOCTYPE html>
<html lang="en">
<head>
title></title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="dns-prefetch" href="https://www.91-cdn.com">
<link rel="shortcut icon" href="https://www.91-cdn.com/images/favicon.ico" />
<style type="text/css">
</style>
<script type=”text/javascript”>
<!-- Google Tag Manager –>
<!-- GA4 –>
<!-- Google Ads –>
<!-- Comscore/3rd party –>
</script>
</head>
<body>
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" defer></script>
</body>
</html>
Basic optimisation pagespeed - I
● Gzip compression
● Reduce TTFB using Varnish
● Minification of CSS and JS files
● Static content caching using “Cache-Control” headers
● Use of “async” and “defer” for loading Javascripts
● Use of CDN
● Lazy loading of offscreen images
Basic optimisation pagespeed - II
● HTML minification
● Loading critical and non-critical CSS separately
● Loading of “non-critical” Javascripts on first scroll.
● Lazy Loading of Ads (fetch and render)
● Avoid the use of Fonts
● Reduce DOM size
Optimisation Core Web Vitals
1. Largest Contentful Paint (LCP)
2. First Input Delay (FID)
3. Cumulative Layout Shift (CLS)
Largest Contentful Paint (LCP)
● LCP is the render time of the largest image or text block visible within the
viewport, relative to when the page first started loading.
● To optimize LCP you should also use the First Contentful Paint (FCP) and
Time to First Byte (TTFB) timings.
● A large delta between TTFB and FCP could indicate that the browser needs
to download a lot of render-blocking assets.
● A large delta between FCP and LCP indicates that the LCP resource is
either not immediately available for the browser to prioritize or that the
browser is completing other work before it can display the LCP content.
Largest Contentful Paint (LCP)
Largest Contentful Paint (LCP)
Optimise Largest Contentful Paint (LCP)
1. Eliminate resource load delay (ensure the LCP resource starts loading as
early as possible)
2. Eliminate element render delay (ensure the LCP element can render
immediately after its resource has finished loading)
3. Reduce resource load time (goal of this step is to reduce the time spent
transferring the bytes of the resource over the network to the user's
device)
4. Reduce time to first byte (goal of this step is to deliver the initial HTML as
quickly as possible)
First Input Delay (FID)
● The First Input Delay (FID) metric helps measure your user's first
impression of your site's interactivity and responsiveness.
● FID measures the time from when a user first interacts with a page to the
time when the browser is actually able to begin processing event handlers
in response to that interaction.
● Input delay happens because the browser's main thread is busy doing
something else, so it can't (yet) respond to the user.
First Input Delay (FID)
Optimise First Input Delay (FID)
The browser cannot respond to most user input while it's executing JavaScript on the main
thread. In other words, the browser can't respond to user interactions while the main thread is
busy. To improve this
1. Break up Long Tasks (avoid any piece of code that blocks the main thread for 50 ms or
more)
2. Optimize your page for interaction readiness
3. Use a web worker (run JavaScript on a background thread)
4. Reduce JavaScript execution time (use of “async”, “defer” and minimise the use of legacy
support to give backward compatibility)
Cumulative Layout Shift (CLS)
● CLS is a measure of the largest burst of layout shift scores for every
unexpected layout shift that occurs during the entire lifespan of a page.
● A layout shift occurs any time a visible element changes its position from
one rendered frame to the next.
Cumulative Layout Shift (CLS)
Optimise Cumulative Layout Shift (CLS)
The most common causes of a poor CLS are
1. Images without dimensions (include width and height size attributes, so that
the browser can allocate the correct amount of space in the document )
2. Ads, embeds, and iframes without dimensions (Statically reserve space for
late-loading content)
3. Dynamically injected content such as ads, embeds, and iframes without
dimensions
4. Web fonts
Further reading
● https://web.dev/vitals/
● https://web.dev/optimize-lcp/
● https://web.dev/optimize-fid/
● https://web.dev/optimize-cls/
Thanks

More Related Content

Similar to An Introduction to Pagespeed Optimisation

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
 
Improving frontend performance
Improving frontend performanceImproving frontend performance
Improving frontend performanceSagar Desarda
 
CrUx Report and Improving Web vitals
CrUx Report and Improving Web vitalsCrUx Report and Improving Web vitals
CrUx Report and Improving Web vitalsPratyush Majumdar
 
Demystifying web performance tooling and metrics
Demystifying web performance tooling and metricsDemystifying web performance tooling and metrics
Demystifying web performance tooling and metricsAnna Migas
 
Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers
Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers
Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers Authoritas
 
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
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)clickramanm
 
Demystifying Web Vitals
Demystifying Web VitalsDemystifying Web Vitals
Demystifying Web VitalsSamar Panda
 
Client-side Website Optimization
Client-side Website OptimizationClient-side Website Optimization
Client-side Website OptimizationRadu Pintilie
 
Is Poor Performance Dragging You Down? Here are Five Strategies to Maximize P...
Is Poor Performance Dragging You Down? Here are Five Strategies to Maximize P...Is Poor Performance Dragging You Down? Here are Five Strategies to Maximize P...
Is Poor Performance Dragging You Down? Here are Five Strategies to Maximize P...Nirvana Canada
 
Best practices to increase the performance of web-based applications
Best practices to increase the performance of web-based applicationsBest practices to increase the performance of web-based applications
Best practices to increase the performance of web-based applicationsMouhamad Kawas
 
PrairieDevCon 2014 - Web Doesn't Mean Slow
PrairieDevCon 2014 -  Web Doesn't Mean SlowPrairieDevCon 2014 -  Web Doesn't Mean Slow
PrairieDevCon 2014 - Web Doesn't Mean Slowdmethvin
 
Developing high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web workerDeveloping high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web workerSuresh Patidar
 
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
 
Tips tricks deliver_high_performing_secure_web_pages
Tips tricks deliver_high_performing_secure_web_pagesTips tricks deliver_high_performing_secure_web_pages
Tips tricks deliver_high_performing_secure_web_pagesAditya Singh
 
jQuery Conference San Diego 2014 - Web Performance
jQuery Conference San Diego 2014 - Web PerformancejQuery Conference San Diego 2014 - Web Performance
jQuery Conference San Diego 2014 - Web Performancedmethvin
 

Similar to An Introduction to Pagespeed Optimisation (20)

Browser Based Performance Testing and Tuning
Browser Based Performance Testing and TuningBrowser Based Performance Testing and Tuning
Browser Based Performance Testing and Tuning
 
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
 
Improving frontend performance
Improving frontend performanceImproving frontend performance
Improving frontend performance
 
Presemtation Tier Optimizations
Presemtation Tier OptimizationsPresemtation Tier Optimizations
Presemtation Tier Optimizations
 
Web Vitals.pptx
Web Vitals.pptxWeb Vitals.pptx
Web Vitals.pptx
 
CrUx Report and Improving Web vitals
CrUx Report and Improving Web vitalsCrUx Report and Improving Web vitals
CrUx Report and Improving Web vitals
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
Demystifying web performance tooling and metrics
Demystifying web performance tooling and metricsDemystifying web performance tooling and metrics
Demystifying web performance tooling and metrics
 
Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers
Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers
Tom Bennet – BrightonSEO April 2016: Site Speed for content Marketers
 
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
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)
 
Demystifying Web Vitals
Demystifying Web VitalsDemystifying Web Vitals
Demystifying Web Vitals
 
Client-side Website Optimization
Client-side Website OptimizationClient-side Website Optimization
Client-side Website Optimization
 
Is Poor Performance Dragging You Down? Here are Five Strategies to Maximize P...
Is Poor Performance Dragging You Down? Here are Five Strategies to Maximize P...Is Poor Performance Dragging You Down? Here are Five Strategies to Maximize P...
Is Poor Performance Dragging You Down? Here are Five Strategies to Maximize P...
 
Best practices to increase the performance of web-based applications
Best practices to increase the performance of web-based applicationsBest practices to increase the performance of web-based applications
Best practices to increase the performance of web-based applications
 
PrairieDevCon 2014 - Web Doesn't Mean Slow
PrairieDevCon 2014 -  Web Doesn't Mean SlowPrairieDevCon 2014 -  Web Doesn't Mean Slow
PrairieDevCon 2014 - Web Doesn't Mean Slow
 
Developing high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web workerDeveloping high performance and responsive web apps using web worker
Developing high performance and responsive web apps using web worker
 
Client-side Web Performance Optimization [paper]
Client-side Web Performance Optimization [paper]Client-side Web Performance Optimization [paper]
Client-side Web Performance Optimization [paper]
 
Tips tricks deliver_high_performing_secure_web_pages
Tips tricks deliver_high_performing_secure_web_pagesTips tricks deliver_high_performing_secure_web_pages
Tips tricks deliver_high_performing_secure_web_pages
 
jQuery Conference San Diego 2014 - Web Performance
jQuery Conference San Diego 2014 - Web PerformancejQuery Conference San Diego 2014 - Web Performance
jQuery Conference San Diego 2014 - Web Performance
 

More from Pratyush Majumdar

More from Pratyush Majumdar (6)

Aws Architecture Training
Aws Architecture TrainingAws Architecture Training
Aws Architecture Training
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Selenium Automation
Selenium AutomationSelenium Automation
Selenium Automation
 
Making app cluster ready
Making app cluster readyMaking app cluster ready
Making app cluster ready
 
SEI CMMI presentation
SEI CMMI presentationSEI CMMI presentation
SEI CMMI presentation
 
Apache architecture
Apache architectureApache architecture
Apache architecture
 

Recently uploaded

How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...SofiyaSharma5
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663Call Girls Mumbai
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 
SEO Growth Program-Digital optimization Specialist
SEO Growth Program-Digital optimization SpecialistSEO Growth Program-Digital optimization Specialist
SEO Growth Program-Digital optimization SpecialistKHM Anwar
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...aditipandeya
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...sonatiwari757
 

Recently uploaded (20)

How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
SEO Growth Program-Digital optimization Specialist
SEO Growth Program-Digital optimization SpecialistSEO Growth Program-Digital optimization Specialist
SEO Growth Program-Digital optimization Specialist
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
 

An Introduction to Pagespeed Optimisation

  • 2. Why Performance Matters - I A recent study shows that 46% of users won't revisit a website if it has poor performance and 25% of visitors will abandon a website that takes longer than 4 seconds to load. A study by Walmart shows that every one-second improvement in website loading time increases conversion by 2%. If your site visitor stays longer, they are more likely to convert.
  • 3. Why Performance Matters - II ● User Experience (Users expect websites to deliver what they want as quickly as possible) ● Visitor Retention (Visitors won’t revisit a slow site) ● Conversions and Sales (If our visitor stays longer, they are more likely to convert) ● Brand Image (A well-performing website will leave a good impression) ● SEO (If a website loads quickly, it can rank higher on Google)
  • 5. Measurement - Page Speed Insight
  • 6. Measurement - Page Speed Insight
  • 7. Introduction to Core Web Vitals - I Core Web Vitals is a set of metrics that measure real-world user experience for loading performance, interactivity, and visual stability of the page. Largest Contentful Paint (LCP): measures loading performance. To provide a good user experience, LCP should occur within 2.5 seconds of when the page first starts loading. First Input Delay (FID): measures interactivity. To provide a good user experience, pages should have a FID of 100 milliseconds or less. Cumulative Layout Shift (CLS): measures visual stability. To provide a good user experience, pages should maintain a CLS of 0.1. or less.
  • 8. Introduction to Core Web Vitals - II
  • 11. Structure of a HTML Page
  • 12. Components of a HTML Page <!DOCTYPE html> <html lang="en"> <head> title></title> <meta name="description" content="" /> <meta name="keywords" content="" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0"> <link rel="dns-prefetch" href="https://www.91-cdn.com"> <link rel="shortcut icon" href="https://www.91-cdn.com/images/favicon.ico" /> <style type="text/css"> </style> <script type=”text/javascript”> <!-- Google Tag Manager –> <!-- GA4 –> <!-- Google Ads –> <!-- Comscore/3rd party –> </script> </head> <body> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" defer></script> </body> </html>
  • 13. Basic optimisation pagespeed - I ● Gzip compression ● Reduce TTFB using Varnish ● Minification of CSS and JS files ● Static content caching using “Cache-Control” headers ● Use of “async” and “defer” for loading Javascripts ● Use of CDN ● Lazy loading of offscreen images
  • 14. Basic optimisation pagespeed - II ● HTML minification ● Loading critical and non-critical CSS separately ● Loading of “non-critical” Javascripts on first scroll. ● Lazy Loading of Ads (fetch and render) ● Avoid the use of Fonts ● Reduce DOM size
  • 15. Optimisation Core Web Vitals 1. Largest Contentful Paint (LCP) 2. First Input Delay (FID) 3. Cumulative Layout Shift (CLS)
  • 16. Largest Contentful Paint (LCP) ● LCP is the render time of the largest image or text block visible within the viewport, relative to when the page first started loading. ● To optimize LCP you should also use the First Contentful Paint (FCP) and Time to First Byte (TTFB) timings. ● A large delta between TTFB and FCP could indicate that the browser needs to download a lot of render-blocking assets. ● A large delta between FCP and LCP indicates that the LCP resource is either not immediately available for the browser to prioritize or that the browser is completing other work before it can display the LCP content.
  • 19. Optimise Largest Contentful Paint (LCP) 1. Eliminate resource load delay (ensure the LCP resource starts loading as early as possible) 2. Eliminate element render delay (ensure the LCP element can render immediately after its resource has finished loading) 3. Reduce resource load time (goal of this step is to reduce the time spent transferring the bytes of the resource over the network to the user's device) 4. Reduce time to first byte (goal of this step is to deliver the initial HTML as quickly as possible)
  • 20. First Input Delay (FID) ● The First Input Delay (FID) metric helps measure your user's first impression of your site's interactivity and responsiveness. ● FID measures the time from when a user first interacts with a page to the time when the browser is actually able to begin processing event handlers in response to that interaction. ● Input delay happens because the browser's main thread is busy doing something else, so it can't (yet) respond to the user.
  • 22. Optimise First Input Delay (FID) The browser cannot respond to most user input while it's executing JavaScript on the main thread. In other words, the browser can't respond to user interactions while the main thread is busy. To improve this 1. Break up Long Tasks (avoid any piece of code that blocks the main thread for 50 ms or more) 2. Optimize your page for interaction readiness 3. Use a web worker (run JavaScript on a background thread) 4. Reduce JavaScript execution time (use of “async”, “defer” and minimise the use of legacy support to give backward compatibility)
  • 23. Cumulative Layout Shift (CLS) ● CLS is a measure of the largest burst of layout shift scores for every unexpected layout shift that occurs during the entire lifespan of a page. ● A layout shift occurs any time a visible element changes its position from one rendered frame to the next.
  • 25. Optimise Cumulative Layout Shift (CLS) The most common causes of a poor CLS are 1. Images without dimensions (include width and height size attributes, so that the browser can allocate the correct amount of space in the document ) 2. Ads, embeds, and iframes without dimensions (Statically reserve space for late-loading content) 3. Dynamically injected content such as ads, embeds, and iframes without dimensions 4. Web fonts
  • 26. Further reading ● https://web.dev/vitals/ ● https://web.dev/optimize-lcp/ ● https://web.dev/optimize-fid/ ● https://web.dev/optimize-cls/