Google Lighthouse Speed Test: How to Optimize Your Website's Speed

Author

Reads 344

A moody black and white aerial shot of the iconic Baily Lighthouse on Howth Head, Ireland.
Credit: pexels.com, A moody black and white aerial shot of the iconic Baily Lighthouse on Howth Head, Ireland.

Google Lighthouse Speed Test is a powerful tool that helps you identify areas of improvement for your website's speed. It provides a comprehensive report on your website's performance, highlighting issues that slow it down.

To start, you need to run a Lighthouse audit on your website, which takes just a few seconds to complete. You can do this by visiting the website, clicking on the Lighthouse icon, and following the prompts.

The audit will give you a score out of 100, based on how well your website performs in various categories, such as performance, accessibility, and best practices. Aim for a score of 90 or higher to ensure your website loads quickly and smoothly.

You can also use Lighthouse to test your website on different devices and browsers, which is especially useful if you have a mobile-friendly website.

Unwrapping the Report

Lighthouse assigns a score to your website across five categories.

The report includes various metrics, but you can also configure alerts for specific metrics.

Credit: youtube.com, Crash Course: How To Analyze A Google Lighthouse Report 2021 | Actionable Website Speed Insights

You can monitor and alert for a particular web page audit metric, and the system will track the selected metric scores in the Lighthouse report.

If you specify an Error Threshold for the metric score and select the Alert on Lighthouse errors option, the device will be considered failed if the score is beyond the allowable range.

To receive alert notifications, configure alerts for the device on the Alerts tab of the device edit screen.

You can also configure scheduled reports that will aggregate the results of the selected metric monitoring based on daily, weekly, or monthly statistics.

Choose one audit metric from the following Lighthouse metrics to receive alerts and reports on.

Performance Audit

A performance audit with Google Lighthouse is a must-have for any website owner. It calculates how fast a web page loads and how quickly it becomes interactive.

Lighthouse presents your performance for five key metrics: First Contentful Paint (FCP), Largest Contentful Paint (LCP), Cumulative Layout Shift (CLS), Speed Index (SI), and Total Blocking Time (TBT).

Credit: youtube.com, Web Page performance Audit| Page speed insights | Lighthouse | webpage test

FCP measures how fast a user can see the actual content on your page, such as images, text, and videos. LCP calculates the time it takes for the largest and most important visible element to load.

CLS calculates the shifts in the layout that take place during the loading of the webpage, evaluating its stability and predictability. Speed Index displays how fast the contents of a page are visible to users.

Total Blocking Time evaluates the page's load responsiveness to user input, useful for removing your FID score in lab data.

Here are the five metrics with a brief description:

  • First Contentful Paint (FCP): Measures how fast a user can see the actual content on your page.
  • Largest Contentful Paint (LCP): Calculates the time it takes for the largest and most important visible element to load.
  • Cumulative Layout Shift (CLS): Calculates the shifts in the layout that take place during the loading of the webpage.
  • Speed Index (SI): Displays how fast the contents of a page are visible to users.
  • Total Blocking Time (TBT): Evaluates the page's load responsiveness to user input.

Your overall performance score should be between 0 to 100, with a score between 90 and 100 indicating your page is effectively optimized for user experience.

Optimization Techniques

You can optimize your images by compressing them, which not only enhances your website's performance but also its accessibility and SEO scores.

Adding alt text and descriptions to your images provides context to site crawlers and gives screen readers an easy way to represent imagery for people with no vision.

Credit: youtube.com, The ultimate guide to web performance

To optimize your Largest Contentful Paint (LCP) score, you should shrink your video sizes, be aware of the size of your background images, and optimize your fonts completely.

Set-up page caching can also help in boosting your server response time remarkably and improving your LCP score.

RabbitLoader, a cache-based speed optimization plugin, can efficiently defer non-critical Javascript files and third-party services, which can help in improving your Total Blocking Time (TBT) and Time To Interactive (TTI) scores.

You should also try to reduce unnecessary plugins on your website, as they can start conflicting with each other and make your website slower.

Optimize Your Images

Optimizing your images can make a huge difference in your website's performance. By compressing every photo, you can optimize your images.

Images should be responsive and scaled to the screen size, making them look great on any device. They should also have SEO-friendly titles, alt texts, and alt descriptions.

Credit: youtube.com, Mass Image Optimization

Adding alt text and descriptions provides screen readers with an easy way to represent imagery for people with no vision, which is a great way to improve accessibility.

Automating the process can be a lifesaver if you have hundreds or thousands of images to optimize. You can use an image optimizer like RabbitLoader to make the process much faster and easier.

Optimizing your images not only improves your website's performance but also enhances both SEO and Accessibility scores.

Reduce Unnecessary Plugins

Reducing unnecessary plugins can make a huge difference in your website's performance.

RabbitLoader efficiently defers non-critical Javascript files, specifically those belonging to third-party services, and third-party plugins like chat widgets, pop-ups, analytics, and so on.

On platforms like WordPress & many other CMS’s a large number of packages or plugins are available to improve the performance of your website.

You don't need several plugins for caching, image size reduction, CSS, HTML, and Javascript minification, compression, and so on.

RabbitLoader will optimize your website in a few minutes, making it a one-stop solution for all your optimization needs.

Accessibility and SEO

Credit: youtube.com, Google Lighthouse tutorial (20223: How to audit any website for speed, accessibility, SEO & more

Google Lighthouse's accessibility test analyzes how well people who use assistive technologies can use your website. It looks at elements like buttons and links to see whether they're described well.

Lighthouse also analyzes images to see whether alt text is specified, so users with limited or no vision can understand what the image is about. The accessibility report gives you a score out of 100, with a higher score indicating better accessibility.

Achieving an accessibility score of 100 is possible, even for website builders, if you have a grasp of SEO and accessibility fundamentals. However, it's essential to pay attention to the "Additional Items to Manually Check" section, as Lighthouse isn't an exhaustive accessibility audit.

Accessibility

Accessibility is crucial for ensuring that your website is usable by people of all physical and cognitive abilities and limitations.

The Lighthouse score is a rating that summarizes how accessible your page is, with a higher score indicating better accessibility.

Credit: youtube.com, An Introduction to Accessibility and SEO [Series Part 1] — Whiteboard Friday

A score of 100 is ideal, but Lighthouse isn't an exhaustive accessibility audit, so manual checks may be necessary to confirm full accessibility.

To achieve a high accessibility score, you'll need to ensure your website is built with semantically-rich HTML tags, alternative text, and ARIA landmarks.

The tool also checks for specified page language, which is essential for screen readers to understand and use your website fully.

Even small fixes, such as making sure HTML elements are titled correctly, can go a long way to ensure accessibility for all users.

If your accessibility score is lower than ideal, you can refer to Google's detailed information on each check to know where to look.

Additionally, you can use a web accessibility checklist to improve usability for everyone.

In fact, achieving a high accessibility score isn't difficult if you have a grasp of SEO and accessibility fundamentals, especially if you're using a website builder.

SEO

Lighthouse assesses the SEO of a website by considering elements such as structured data, meta tags, and headings. It checks if your page has valid structured data or not, whether your page is mobile-friendly, and so on.

Credit: youtube.com, Web Accessibility and SEO

It provides a score out of 100 and gives suggestions to enhance the search engine visibility of your website.

The SEO score assesses how closely your page adheres to SEO best practices, checking for valid use of HTML tags and attributes.

A quick scan of this section can help you resolve any errors that come up pretty quickly, but a more in-depth crawling tool will provide lots more information.

The SEO Overall Scores ensure that your page is optimized for search engine results ranking, showing relevant titles, meta descriptions, successful status codes, and more.

Items that did not meet the audit criteria need to be reviewed for SEO improvement and optimization.

Progressive Web App (PWA)

The Progressive Web App (PWA) audit in Lighthouse is a crucial test that checks if your web application provides an optimal user experience. It validates whether your web app uses modern web capabilities to deliver a seamless experience.

The PWA audit checks three key factors: your web app's performance on mobile networks, its offline functionality, and its installability on multiple device types. It also looks for features like push notifications and a custom splash screen.

Credit: youtube.com, Indexing your PWA (Discoverability & SEO) - Progressive Web App Training

The test runs your web app against these factors and assigns one of the PWA badges. Unlike the first four reports, you're assigned a badge (not a score of 100) when you run a PWA audit in Lighthouse.

The audit report provides suggestions for improving your overall PWA performance, including specific issues that need to be addressed. Lighthouse is also available through Google's PageSpeed Insights tool.

Here are the key benefits of a successful PWA test:

  • Fast and reliable performance on mobile networks
  • Offline functionality and installability on multiple device types
  • PWA-optimized by redirecting HTTP traffic to HTTPS and implementing best practices

Using Google Lighthouse

You can access Google Lighthouse in two main ways: through the Chrome extension and by using Chrome DevTools. To use the Chrome extension, simply install it on your browser, visit the web page you want to test, and click the Lighthouse symbol in the extension menu to generate a report.

To use Chrome DevTools, you can either right-click on the page and select Inspect, or open the DevTools panel by selecting View > Developer > Developer Tools. From there, select Lighthouse from the top tab menu and click Generate Report to see your audit scores for each category.

How It Works

Credit: youtube.com, What Is Google Lighthouse and How to Use It?

Google Lighthouse works by performing audits for five main website optimization categories. It's a powerful tool that helps you identify areas for improvement.

Google Lighthouse audits your website for performance, accessibility, best practices, SEO, and progressive web app features. These categories are the foundation of what makes your website shine.

The audits are designed to give you a clear picture of your website's strengths and weaknesses. You'll get detailed reports and actionable recommendations to help you optimize your site.

Performance audits check how quickly your website loads and responds to user interactions. Accessibility audits ensure your site is usable by everyone, regardless of abilities. Best practices audits highlight common mistakes and areas for improvement. SEO audits help you optimize your site for search engines. Progressive web app features audits check if your site meets the requirements for a seamless user experience.

Each audit provides a score and suggestions for improvement. You can use this information to make targeted changes and see the impact on your website's performance.

Using with Chrome DevTools

Credit: youtube.com, How to Use Google Lighthouse: How it Works, Chrome DevTools, PageSpeed Insights, Extensions

Using Google Lighthouse with Chrome DevTools is a great way to audit your pages. You can run a Google Lighthouse audit with Chrome DevTools in your Chrome browser.

To do this, open the DevTools panel by right-clicking the page and choosing Inspect. You can also open DevTools by selecting View > Developer > Developer Tools, or by pressing Command+Option+C on Mac or Control+Shift+C on Windows.

In the DevTools panel, select Lighthouse from the top tab menu. Then, click Generate Report. By default, Lighthouse will assess all five categories simulated on a mobile device. You can toggle these settings in the Lighthouse tab before generating your report.

Note that Lighthouse measures performance for six speed metrics when you run a performance audit with DevTools. This extra metric is Time to Interactive (TTI), which calculates the time it takes for a page to become fully interactive for users.

To access Lighthouse in DevTools, you may need to click on the two arrows at the end of the toolbar to see the Lighthouse option. Once you've selected Lighthouse, you can choose to analyze one, more, or all categories, depending on which aspects of your website you want to analyze.

Credit: youtube.com, How to Measure Website Performance using Lighthouse Tool

Here's a step-by-step guide to using Lighthouse with Chrome DevTools:

  1. Open the web page you want to assess.
  2. Open the DevTools panel by right-clicking the page and choosing Inspect.
  3. In the DevTools panel, select Lighthouse from the top tab menu.
  4. Click Generate Report.

This will generate a report for you, showing your audit scores for each category at the top. You can click on a specific category to learn more about the results.

Report Metrics and Insights

Google Lighthouse uses a traffic light system to indicate how concerned you should be about a particular score, with red triangles for scores 0-49, orange squares for scores 50-89, and green circles for scores 90-100.

The median Performance score on Lighthouse is just 34 out of 100, according to Astro's public data, so even if you're in the green, you're already doing better than the vast majority of websites.

Each category in the Lighthouse report is broken down into more specific metrics, and while it's great to aim for 80+ across all scores, achieving complete perfection is often impossible.

Here are the six speed metrics measured by Lighthouse when you run a performance audit with DevTools:

Using Insights

Close-up of a vintage car interior showcasing retro speedometer gauges and a classic steering wheel.
Credit: pexels.com, Close-up of a vintage car interior showcasing retro speedometer gauges and a classic steering wheel.

Lighthouse checks your website and assigns it a score across five various categories. This helps you identify areas that need improvement.

To get started with Lighthouse, open the tool, enter your page URL, and click “Analyze.” This will generate reports for all categories, except PWA, which PageSpeed Insights doesn't perform audits on.

You can also use the command line to generate reports once Lighthouse is installed. Simply replace the “url” with the web address of the page you want to test.

To effectively use the Lighthouse report, it's essential to track changes in SEO scores before and after improvements. This way, you can monitor how SEO scores change over time and on a regular basis.

Focusing on performance metrics like First Contentful Paint and First Meaningful Paint scores can help you optimize your website's functionality without affecting its performance.

Report Metrics

Lighthouse uses a traffic light system to indicate how concerned you should be about a particular score, with scores ranging from 1 to 100 and flagged as follows: red triangle (0-49), orange square (50-89), and green circle (90-100).

Towering lighthouse amidst rugged Icelandic landscape with snowy peaks.
Credit: pexels.com, Towering lighthouse amidst rugged Icelandic landscape with snowy peaks.

The Performance report includes various metrics, such as First Contentful Paint, First Meaningful Paint, Speed Index, First CPU Idle, Time to Interactive, and Estimated input latency.

Lighthouse collects and analyzes data about the pages' load times and assigns them a score based on these metrics, with scores categorized as fast (≥90), average (50-89), or slow (≤ 50).

You can select a metric and set an error threshold to receive alert notifications when a monitored score is out of the acceptable range using Dotcom-Monitor.

The system will monitor the selected metric scores in the Lighthouse report, and if the Error Threshold for the metric score is specified and the Alert on Lighthouse errors option is selected, the device will be considered as failed in instances when the score of interest is beyond the allowable range.

Here are the six speed metrics measured by Lighthouse when you run a performance audit with DevTools: First Contentful Paint, First Meaningful Paint, Speed Index, First CPU Idle, Time to Interactive, and Estimated input latency.

The Time to Interactive metric calculates the time it takes for a page to become fully interactive for users.

Google also compares your page speeds to those of competing pages and adjusts the page score accordingly when calculating the site score based on field data.

The median Performance score on Lighthouse is just 34 out of 100, according to public data by Astro.

5 Hacks to Improve Your

Credit: youtube.com, Improve Your Website's Performance with Google Lighthouse

Here are 5 hacks to improve your Google Lighthouse speed test score.

First, make sure your page is created on the latest standards of web development. Lighthouse checks for this in its Best Practices audit, which examines factors like using a secure connection (HTTPS) and preventing browser errors.

Using a secure connection (HTTPS) is crucial, as it ensures your website's integrity and protects user data. In fact, Lighthouse checks if your website uses HTTPS as part of its Best Practices audit.

Lighthouse also checks if your page allows users to paste passwords in the password section or allows the usage of password managers. This is another important aspect of web development that affects your score.

To improve your score, ensure all JavaScript libraries are protected and free from vulnerabilities. Lighthouse checks for this in its Best Practices audit, examining factors like safe JavaScript libraries and effective Content Security Policy (CSP) against cross-site scripting (XSS) attacks.

Here are some key areas to focus on to improve your score:

  • Use HTTPS
  • Prevent browser errors
  • Use secure JavaScript libraries
  • Implement effective Content Security Policy (CSP)
  • Allow users to paste passwords in the password section

Frequently Asked Questions

How to check Google Lighthouse score?

To check your Google Lighthouse score, open Chrome DevTools, click the Lighthouse tab, and then click Analyze page load to run an audit. This will give you a score and recommendations to improve your website's performance and accessibility.

Elaine Block

Junior Assigning Editor

Elaine Block is a seasoned Assigning Editor with a keen eye for detail and a passion for storytelling. With a background in technology and a knack for understanding complex topics, she has successfully guided numerous articles to publication across various categories. Elaine's expertise spans a wide range of subjects, from cutting-edge tech solutions like Nextcloud Configuration to in-depth explorations of emerging trends and innovative ideas.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.