SlideShare une entreprise Scribd logo
1  sur  44
Télécharger pour lire hors ligne
mattbailey.io
How I achieved a pretty
good Google PageSpeed
Insights Score
98/100* on both Mobile and Desktop
*On the home page at least…
The background
Built using Jekyll, a static site generator
No PHP, no database, just HTML, CSS and a tiny
bit of JavaScript
First of all, why bother when the site already
seemed pretty quick?
• It was a learning exercise for me
• I wanted to see how good a score I could get
• Plus, a certain amount of professional pride
was at stake
• Even if your site feels fast, it’s important to
resolve any underlying issues
• They are likely to become more and more
pronounced as a project scales up
• Google PageSpeed Insights highlighted a
number of problems
• And scored the site 68/100 for mobile, and
75/100 for desktop
:(
My Approach
Inline Critical CSS
CSS is a render-blocking resource
Inline critical CSS in the <head> to reduce
network request latency
The fewer HTTP requests the better
The goal - render ‘above-the-fold’ content in
one roundtrip to the server (~14kb)
Asynchronously loaded assets are not render-
blocking
Defer the remaining CSS using an async loader,
such as this one by Filament Group
https://github.com/filamentgroup/loadCSS
However, that means introducing a dependency
on some render-blocking JavaScript
If you load CSS asynchronously you will need to
deal with FOUC (Flash of Unstyled Content)
IMO keeping it simple is often best
Unless your CSS is rather large, just load it
normally - the browser will cache it
In my case my minified CSS was under 10KB*, so
I inlined the whole lot!
*10KB is the recommended maximum size for
inlined CSS
Use an async font loader
My site uses fonts from Typekit
Originally I had rather lazily used the standard
font loading script
<script src="https://use.typekit.net/vbu2ffi.js"></script>

<script>try{Typekit.load({ async: true });}catch(e){}</script>
However, Google does not like this
“Eliminate render-blocking Javascript and CSS
in above-the-fold content”
The solution?
Use an async font loading script
This means the browser can carry on rendering
the page without waiting for the fonts to load
What about FOUT (Flash of Unstyled Text)?
Typekit adds helper classes to the <html> tag
You can hook into them to initially hide, and
then show text once the fonts have loaded
.wf-loading

.wf-active
Remove render-blocking JavaScript
Google recommends:
If the script is small you can inline it to reduce
network request latency
Larger, external scripts should be loaded
asynchronously so as not to block DOM
construction
In my case the scripts used were small and non-
critical
So I inlined them at the bottom of the page
Minify HTML
You’ll have minimal gains in terms of bytes
saved, but it’s one more thing ticked off the list
It can be tricky to do, especially on dynamic
sites, but on simple, static sites it shouldn’t be a
problem
On my site I used a Ruby gem, called minify-
html - job done!
Enable Gzip compression on the server
Modern browsers can manage GZipped files on-
the-fly
Fewer bytes means faster downloads
Implementation
Configure mod_deflate in your .htaccess file
The h5bp project .htaccess file has a ‘Web
Performance’ section you can copy and paste
In summary
• Inline critical CSS, defer the rest (or not)
• Use an async font loader
• Remove render-blocking JavaScript
• Minify HTML
• Enable Gzip compression on the server
The result…
Having done all that I managed a score of
98/100 on both mobile and desktop!
:)
Why not 100/100?
“Leverage browser caching”
Unfortunately I have no control over external
resources and their cache headers:
http://use.typekit.net/vbu2ffi.js

http://www.google-analytics.com/ga.js
But I can live with that
What are your own
experiences with web
performance and SilverStripe?

Contenu connexe

Tendances

Tools for HTML5
Tools for HTML5Tools for HTML5
Tools for HTML5
lillianabe
 
How to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteHow to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! Site
Daniel Kanchev
 

Tendances (20)

Tools for HTML5
Tools for HTML5Tools for HTML5
Tools for HTML5
 
Html5 aavaas gajurel techmela
Html5  aavaas gajurel techmelaHtml5  aavaas gajurel techmela
Html5 aavaas gajurel techmela
 
Speed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate PerformanceSpeed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate Performance
 
More efficient, usable web
More efficient, usable webMore efficient, usable web
More efficient, usable web
 
Optimizing your WordPress website
Optimizing your WordPress websiteOptimizing your WordPress website
Optimizing your WordPress website
 
Blazor - An Introduction
Blazor - An IntroductionBlazor - An Introduction
Blazor - An Introduction
 
Introduction to WordPress Security
Introduction to WordPress SecurityIntroduction to WordPress Security
Introduction to WordPress Security
 
Scaling woo commerce-v2-pagely
Scaling woo commerce-v2-pagelyScaling woo commerce-v2-pagely
Scaling woo commerce-v2-pagely
 
Site Speed Hacks: Open West 2015
Site Speed Hacks: Open West 2015Site Speed Hacks: Open West 2015
Site Speed Hacks: Open West 2015
 
Angular and SEO - Greenlane All Hands Day 10/17/16
Angular and SEO - Greenlane All Hands Day 10/17/16Angular and SEO - Greenlane All Hands Day 10/17/16
Angular and SEO - Greenlane All Hands Day 10/17/16
 
Web performance optimization for modern web applications
Web performance optimization for modern web applicationsWeb performance optimization for modern web applications
Web performance optimization for modern web applications
 
Html5 for beginners
Html5 for beginnersHtml5 for beginners
Html5 for beginners
 
Caching 101
Caching 101Caching 101
Caching 101
 
Building Responsible Wordpress Sites
Building Responsible Wordpress SitesBuilding Responsible Wordpress Sites
Building Responsible Wordpress Sites
 
NodeSummit - MEAN Stack
NodeSummit - MEAN StackNodeSummit - MEAN Stack
NodeSummit - MEAN Stack
 
Modern web application devlopment workflow
Modern web application devlopment workflowModern web application devlopment workflow
Modern web application devlopment workflow
 
Real World HTML5 + ASP.NET MVC - Lessons Learned
Real World HTML5 + ASP.NET MVC - Lessons LearnedReal World HTML5 + ASP.NET MVC - Lessons Learned
Real World HTML5 + ASP.NET MVC - Lessons Learned
 
How to Speed Up Your Joomla Website
How to Speed Up Your Joomla WebsiteHow to Speed Up Your Joomla Website
How to Speed Up Your Joomla Website
 
How to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteHow to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! Site
 
DrupalCon Barcelona 2015
DrupalCon Barcelona 2015DrupalCon Barcelona 2015
DrupalCon Barcelona 2015
 

En vedette (8)

08 led-18 w-ceiling-sq-flush
08 led-18 w-ceiling-sq-flush08 led-18 w-ceiling-sq-flush
08 led-18 w-ceiling-sq-flush
 
Lindenwood Letter of Rec
Lindenwood Letter of RecLindenwood Letter of Rec
Lindenwood Letter of Rec
 
NOV 2016 Profile ABDUR RAHMAN
NOV 2016 Profile ABDUR RAHMANNOV 2016 Profile ABDUR RAHMAN
NOV 2016 Profile ABDUR RAHMAN
 
Ako správne osloviť dievča, ženu na pokec i m.m.
Ako správne osloviť dievča, ženu na pokec i m.m.Ako správne osloviť dievča, ženu na pokec i m.m.
Ako správne osloviť dievča, ženu na pokec i m.m.
 
Rifalni 10-11-16
Rifalni 10-11-16Rifalni 10-11-16
Rifalni 10-11-16
 
Выполняй правила безопасности на дороге!
Выполняй правила безопасности на дороге!Выполняй правила безопасности на дороге!
Выполняй правила безопасности на дороге!
 
Global Net Tech profile
Global Net Tech profileGlobal Net Tech profile
Global Net Tech profile
 
Media (16)
Media (16)Media (16)
Media (16)
 

Similaire à How i acheived a pretty good google page speed insights score

Web Client Performance
Web Client PerformanceWeb Client Performance
Web Client Performance
Herea Adrian
 
Drupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityDrupal Frontend Performance and Scalability
Drupal Frontend Performance and Scalability
Ashok Modi
 
Website Performance
Website PerformanceWebsite Performance
Website Performance
Hugo Fonseca
 

Similaire à How i acheived a pretty good google page speed insights score (20)

Web Client Performance
Web Client PerformanceWeb Client Performance
Web Client Performance
 
Speed!
Speed!Speed!
Speed!
 
Cache is keeping you from reaching the full potential as a developer (word ca...
Cache is keeping you from reaching the full potential as a developer (word ca...Cache is keeping you from reaching the full potential as a developer (word ca...
Cache is keeping you from reaching the full potential as a developer (word ca...
 
Drupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityDrupal Frontend Performance and Scalability
Drupal Frontend Performance and Scalability
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
A Holistic View of Website Performance
A Holistic View of Website PerformanceA Holistic View of Website Performance
A Holistic View of Website Performance
 
Lazy load Website Assets
Lazy load Website AssetsLazy load Website Assets
Lazy load Website Assets
 
WordPress optimization
WordPress optimizationWordPress optimization
WordPress optimization
 
Client Side Optimization
Client Side OptimizationClient Side Optimization
Client Side Optimization
 
Demystifying web performance tooling and metrics
Demystifying web performance tooling and metricsDemystifying web performance tooling and metrics
Demystifying web performance tooling and metrics
 
10 things you can do to speed up your web app today stir trek edition
10 things you can do to speed up your web app today   stir trek edition10 things you can do to speed up your web app today   stir trek edition
10 things you can do to speed up your web app today stir trek edition
 
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital MarketersSearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
 
Magento Performance Improvements with Client Side Optimizations
Magento Performance Improvements with Client Side OptimizationsMagento Performance Improvements with Client Side Optimizations
Magento Performance Improvements with Client Side Optimizations
 
Optimizing Your WordPress Site: Why speed matters, and how to get there
Optimizing Your WordPress Site: Why speed matters, and how to get thereOptimizing Your WordPress Site: Why speed matters, and how to get there
Optimizing Your WordPress Site: Why speed matters, and how to get there
 
Myths & true stories about JavaScript for SEO
Myths & true stories about JavaScript for SEOMyths & true stories about JavaScript for SEO
Myths & true stories about JavaScript for SEO
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
 
Introduction to Optimizing WordPress for Website Speed
Introduction to Optimizing WordPress for Website SpeedIntroduction to Optimizing WordPress for Website Speed
Introduction to Optimizing WordPress for Website Speed
 
Website speed optimization guide for technically advanced webmasters
Website speed optimization guide for technically advanced webmastersWebsite speed optimization guide for technically advanced webmasters
Website speed optimization guide for technically advanced webmasters
 
Website Performance
Website PerformanceWebsite Performance
Website Performance
 
Minimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsMinimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tips
 

Dernier

Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Sheetaleventcompany
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
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
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
ellan12
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 

Dernier (20)

Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
 
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
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
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
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
𓀤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...
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
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 Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 

How i acheived a pretty good google page speed insights score

  • 2. How I achieved a pretty good Google PageSpeed Insights Score
  • 3. 98/100* on both Mobile and Desktop *On the home page at least…
  • 5.
  • 6. Built using Jekyll, a static site generator No PHP, no database, just HTML, CSS and a tiny bit of JavaScript
  • 7. First of all, why bother when the site already seemed pretty quick?
  • 8. • It was a learning exercise for me • I wanted to see how good a score I could get • Plus, a certain amount of professional pride was at stake
  • 9. • Even if your site feels fast, it’s important to resolve any underlying issues • They are likely to become more and more pronounced as a project scales up • Google PageSpeed Insights highlighted a number of problems • And scored the site 68/100 for mobile, and 75/100 for desktop
  • 10.
  • 11. :(
  • 14. CSS is a render-blocking resource Inline critical CSS in the <head> to reduce network request latency The fewer HTTP requests the better The goal - render ‘above-the-fold’ content in one roundtrip to the server (~14kb)
  • 15. Asynchronously loaded assets are not render- blocking Defer the remaining CSS using an async loader, such as this one by Filament Group https://github.com/filamentgroup/loadCSS
  • 16. However, that means introducing a dependency on some render-blocking JavaScript If you load CSS asynchronously you will need to deal with FOUC (Flash of Unstyled Content)
  • 17. IMO keeping it simple is often best Unless your CSS is rather large, just load it normally - the browser will cache it
  • 18. In my case my minified CSS was under 10KB*, so I inlined the whole lot! *10KB is the recommended maximum size for inlined CSS
  • 19.
  • 20. Use an async font loader
  • 21. My site uses fonts from Typekit
  • 22. Originally I had rather lazily used the standard font loading script <script src="https://use.typekit.net/vbu2ffi.js"></script>
 <script>try{Typekit.load({ async: true });}catch(e){}</script>
  • 23. However, Google does not like this “Eliminate render-blocking Javascript and CSS in above-the-fold content”
  • 24. The solution? Use an async font loading script This means the browser can carry on rendering the page without waiting for the fonts to load
  • 25. What about FOUT (Flash of Unstyled Text)? Typekit adds helper classes to the <html> tag You can hook into them to initially hide, and then show text once the fonts have loaded .wf-loading
 .wf-active
  • 27. Google recommends: If the script is small you can inline it to reduce network request latency Larger, external scripts should be loaded asynchronously so as not to block DOM construction
  • 28. In my case the scripts used were small and non- critical So I inlined them at the bottom of the page
  • 29.
  • 31. You’ll have minimal gains in terms of bytes saved, but it’s one more thing ticked off the list It can be tricky to do, especially on dynamic sites, but on simple, static sites it shouldn’t be a problem On my site I used a Ruby gem, called minify- html - job done!
  • 32. Enable Gzip compression on the server
  • 33. Modern browsers can manage GZipped files on- the-fly Fewer bytes means faster downloads
  • 34. Implementation Configure mod_deflate in your .htaccess file The h5bp project .htaccess file has a ‘Web Performance’ section you can copy and paste
  • 35.
  • 37. • Inline critical CSS, defer the rest (or not) • Use an async font loader • Remove render-blocking JavaScript • Minify HTML • Enable Gzip compression on the server
  • 39. Having done all that I managed a score of 98/100 on both mobile and desktop!
  • 40. :)
  • 41.
  • 42. Why not 100/100? “Leverage browser caching” Unfortunately I have no control over external resources and their cache headers: http://use.typekit.net/vbu2ffi.js
 http://www.google-analytics.com/ga.js
  • 43. But I can live with that
  • 44. What are your own experiences with web performance and SilverStripe?