Performance
While performance is already at the heart of Gatsby, it’s important to ensure you are doing all you can to make your content available to your users as fast as possible. Not all users are enjoying high speed connections, or browsing from a desktop. It’s important to make no assumptions, and serve the smallest and fastest site possible, to provide an optimal experience for wherever your users might be coming from. Since Gatsby is already doing a lot of the heavy lifting for you there isn’t a lot required to make your site blazing fast, but by following these guides you can ensure the best possible performance and delivery of your content to your users.
In this section we’ll cover some ways you can optimize caching, set up https
on localhost
for easier testing of performance features, as well as how to measure the performance of your websites, giving you all the tools you need to max out your website’s performance. If you would like a more in-depth explanation of why performance matters so much, check out this article by Addy Osmani on the Cost of JavaScript.
May your Lighthouse scores all be in the green. 😀
In this section:
- Supporting Progressive Web Apps (PWAs)
- Caching
- Using Local HTTPS
- Auditing with Lighthouse
- Adding a Manifest File
- Adding Offline Support with a Service Worker
- Adding Page Metadata
- Search Engine Optimization (SEO)
- Optimizing Site Performance with Guess.js
- Scaling Issues
Edit this page on GitHub