Get a perfect Google Lighthouse

How to get a perfect Google Lighthouse score

TLDR;

Google Lighthouse provides a useful set of guidelines and insights to improve your website, it’s accessibility and experience. It’s not always possible to get a perfect score. But, generally speaking if your scores are green - you’re on the right path.

How I got a perfect Google Lighthouse score

For dholmes.co.uk I had to address the following:

  1. Move critical CSS inline, rather than separate css files
  2. Add the alt, width, height and lazy attributes to all images
  3. Download the Google Fonts CSS file and add the following DNS-prefetch, preconnect and preload link tags:
<link rel="DNS-prefetch" href="//fonts.gstatic.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link rel="preload" as="font"
    href="https://fonts.gstatic.com/s..." crossorigin />
    ...

General steps for getting a perfect Google Lighthouse score

Here’s a more general list of steps you can follow to get a perfect Google Lighthouse score for your website:

  1. Optimize your site’s performance by reducing its page load time. Minify and compress the HTML, CSS, and JavaScript files, as well as reducing the number of HTTP requests made by your site.

  2. Ensure that your site is mobile-friendly by using a responsive design that automatically adjusts to different screen sizes. This will help improve your site’s usability and accessibility on mobile devices.

  3. Make sure that your site is secure by implementing HTTPS. This encrypts the data transmitted between your site and its visitors, protecting against malicious attacks and ensuring that sensitive information is kept private.

  4. Improve the accessibility of your site by following web accessibility standards and guidelines. This will help ensure that your site can be used by people with disabilities, as well as making it more user-friendly for all visitors.

  5. Enhance the user experience of your site by using clear and concise content, well-designed navigation, and easy-to-use forms and buttons. This will help make your site more engaging and enjoyable for your visitors.


Related Posts