Skip to content

Sitecore Speedy - Use best practice page load techniques to achieve excellent Page Speed scores.

License

Notifications You must be signed in to change notification settings

Aceik/Sitecore-Speedy

Repository files navigation

Sitecore Speedy

##Feb 2022 - Update Notice Below

  • There won't be a release for 10.2 planned. It is 2022 and Sitecore 10.2 now supports Next.JS which is a far better option if you're serious about page speed. Yes, the headless world has its challenges and it's a little bit of the bleeding edge / wild west, but worth considering if you have a new build.
  • If you want to get in touch, reach out on Sitecore slack. I'm not actively watching the issues tab in this repository.
  • Google has updated the Page Speed test. You will now see the real-world data tests at the top, which is an amazing improvement for everyone.
  • On the other hand, if you're just running single one-off tests, it's also cranked up the algorithm the next notch it appears. So it's a bit harder again to get into the green zone for single test runs.
  • One tip worth mentioning for those single tests before your get into production. Switch over to using GTMetrics (which is now also based on lighthouse) and choose a testing server closer to your hosting server. For those not using an Edge CDN, this will provide a more accurate 'single' run score.

Sitecore Speedy (SXA Version)

Use best practice page load techniques to achieve Outstanding Page Speed scores for your Sitecore pages.

What does it do ?

Speedy provides a Sitecore Layout and Asset provider that structures your HTML in accordance with Google's recommendations. Google ranks your website with a score out of 100 and provides recommendations on how to achieve better scores. Implementing Critical CSS and Deferred Javascript loading can be tricky. This module provides a framework and brings together the tools needed to automate the process.

Installation, Usage and results screencast ... click here

Results:

Before / After (Full Screenshots):

What does Speedy solve in regard to Page Speed ?

In order to get great page speed scores there are several aspects you need to address. Read more here.

This module addresses Critical CSS and Deferred asset loading, which is perhaps one of the hardest parts of Page Speed to get right.

Is it easy to use ?

It is likely that a developer will be required to setup and tweak the settings before the first full deployment.

Installation prerequisites and notes

  • requires sitecore
  • supports sitecore 10.1
  • supports sitecore 10
  • supports sitecore 9.3
  • supports sitecore 9.2
  • supports sitecore 9.0.2
  • supports sitecore 9.1
  • requires Helix Foundation

Getting Started Steps

  1. Installation - via Sitecore Package - Select Override when promted
  2. Change the layout on the page you want to enable Speedy on
  3. Enable Speedy

Sitecore Settings

Troubleshooting

Read more about how to troubleshoot display issues ...

References and Inspiration

FAQ

Q) My custom libraries written in Jquery won't load via async, what do I do ?

A)

If you have a browse around this has been blogged about a bit. When loading external libraries async its likely that the DOM Ready event that Jquery fires has already passed. Ideally the javascript library would be written so that it will initialise when loaded (regardless of async/defer). If this isn't the case try to find the initialization function within the library. You would call this initialization inside of Speedy.fallbackExperienceAfterLoad = function () { which can be found here

At this stage Speedy doesn't support a hybrid model of loading some scripts in main upfront and some async. It might be something to consider in a future release.

Q) What happened in the Sitecore 10 Release of Speedy ?

A)

A fairly large overhaul that's what. We got feedback that content editors don't really want be generating optimised critical CSS chunks. Or at least its not really fair to put this burden on them. At the same time developers role off projects and don't want to maintain it. So in the V10 release we simply started reading the entire CSS bundle inline into the critical region in the block of the page. This isn't optimal but its a lot more practical and its still give you far better scores than loading all of those external CSS files seperately as render blocking network calls. One caveat to this is that you need to consider GZIP your HTML payload.