Two words you often hear together are mobile and site speed. And that’s not without reason because these two go hand in hand. Mobile-friendliness and site speed are some of the most pressing matters we have to deal with as SEOs, developers, and site owners. Measuring page speed has always been something of a dark art. The site speed tools we use today are fairly adequate, but another tool is trying to come at it from a different, more realistic angle: Google Lighthouse. Here, I’ll take a closer look at how to check your mobile site speed and SEO with Google Lighthouse.
What is Google Lighthouse?
Lighthouse is a tool built by Google and was initially meant to audit Progressive Web Apps (PWA). The tool executes four audits for accessibility, performance, Progressive Web Apps and an extended list of best practices. Recently, Google even added a basic SEO check. Together, these give you an excellent overview of the quality and performance of your website or web app.
Site speed is all about perception and user experience. Speed in numbers means nothing if your site still feels slow. Loads of users around the world are on rather crappy mobile connections of 3G or less. Even with lightning-fast 4G connections, a site can simply feel laggy and slow. And we all know what a devastating effect a slow site can have on your conversion. Shaving milliseconds of the time needed to load your site could make a world of difference.
While testing, Google Lighthouse simulates visiting your mobile site via a flaky 3G connection on a slightly underpowered device. Packets are lost in an attempt to simulate real-world conditions as authentically as possible. After running the test, you’ll get a report with a score and actionable advice with issues to tackle. Granted, the recently updated and redesigned Test My Site by Google is infinitely more beautiful, but also a lot less comprehensive.
PageSpeed Insights vs. Google Lighthouse
PageSpeed Insights is probably the most used site speed analysis tool out there. While it gives you a nice score and a list of possible improvements, it also gives you an idea of the perceived loading speed of your site. Also, PageSpeed Insights gives recommendations, but these are hard, if not impossible to implement – getting a 100/100 is a pipe dream for most sites.
The two most important things PageSpeed Insights looks at:
- First Contentful Paint: This is the time that it takes before a user sees a visual response from the page.
- DOM Content Loaded: This is the time that it takes to fully parse and render an HTML document, ie. the requested page.
Lighthouse takes a much more practical approach and puts user experience front and center. It visits your site over a throttled 3G connection so it can emulate what a real visitor in the real world would experience. Instead of just loading your site as PageSpeed Insights does, Lighthouse checks how and when it responds to input. It finds the exact moment when your content is ready to use, so you can try and optimize that when it feels too slow.
What to look for in Lighthouse results
The whole concept of speeding up your mobile site is two-pronged; your site must be fast, and it must feel fast. You, therefore, need to get your content on screen as fast as possible. Don’t let people wait. Also, users must be able to interact with your content as soon as possible. Since Google announced that page speed is a ranking factor for SEO, you need to fix these issues.
What should your priority be? Load your content first. Awesome graphics and killer animations can wait. Your message – and what people are looking for – is most likely in the content. You can load the rest of the content in the background and ease it on the screen later on.
While measuring the performance of your mobile site, Lighthouse uses the following metrics:
- First meaningful paint: This determines how long it takes for the first meaningful content to appear onscreen. The lower the score, the faster that page appears.
- First interactive: This measures when a page is minimally interactive. This determines if most UI elements are interactive and if the screen responds reasonably to user input.
- Consistently interactive: This measures when a page is fully interactive.
- Perceptual speed index: This speed index shows how quickly the contents of a page are visibly populated. It also comes with a target loading time of <1,250 ms.
- Estimated latency input: This measures how long it takes for your page to respond to user input. A high latency will result in a page that feels sluggish or laggy. The target here is <50 ms.
- Critical requests chain: This network waterfall shows what resources are needed to render this page initially. Prioritize asset loading in the critical rendering path to speed up the page.
The Lighthouse report also features some opportunities to improve the site speed of your mobile site, including how much loading time they will save. These include reducing render-blocking stylesheets, render-blocking scripts, properly sizing images and fixing offscreen images.
All in all, Lighthouse gives you a tremendous amount of insight into the performance of your page. Use these insights to your advantage.
The Lighthouse SEO check
The latest addition to Lighthouse is a basic SEO check. With this check, you can run a simple SEO audit to uncover basics SEO issues a site may have. It gives you suggestions to fix them as well. Since Lighthouse runs locally in your browser, you can run the checks on your staging environment as well.
Google says the SEO check is very much a work in progress and that it currently supports only the most basic SEO checks. They are actively listening to users’ feedback to improve it and to add checks to bring value to SEOs.
Currently, Lighthouse checks:
- Does it have a
<meta name="viewport">tag with
- Does the document have a
- Is there a meta description?
- Does the page have a successful HTTP status code?
- Do links have descriptive text?
- Does the document use legible font sizes?
- Is page not blocked from indexing?
- Does the document have a valid
- Does the document have a valid
- Are there any unwanted plugins?
How to install Google Lighthouse
Getting started with Google Lighthouse is very easy as it is built into Chrome’s Developer Tools Audit panel (Mac: Shift+Cmd+I. Win: Ctrl+Shift+J or F12). From there, you can run the test and get the full report. In addition, there is a separate Chrome add-on for Lighthouse that adds a button to your toolbar, though using it stays the same.
You can also run Lighthouse as a Node package. This way, you can incorporate the test into your build process. When using the Node package, you will also see that there are a couple of audits that only work in a Node environment and not in the Audits panel of the DevTools.
To install Lighthouse globally from the command line use:
npm install -g lighthouse
If you want to run a test for https://example.com use:
The full results of the audit will be available in the terminal, but also in a separate HTML file.
Testing Yoast.com in Lighthouse
It’s time to put Lighthouse through its paces. Let’s see what happens when I shine the spotlight of the lighthouse on yoast.com. Some of the audits are most useful for Progressive Web Apps. Now, Yoast.com isn’t available as web app yet, so we’re only focussing on the Performance tab here. This tab shows how your site or app performs currently and shows you ways to improve it.
In the screenshot below, you can see the results for yoast.com. The initial loading of the site is visualized by a bar showing when the content first appears onscreen. It shows how many milliseconds it takes for the content to become visible. The faster, the better.
From the grades, you can see that yoast.com does OK with a 75 overall score. The first meaningful paint could be a bit better, but the first interactive and consistently interactive are good at 4,360ms. They even happen at the same time. That’s good news, as the site is completely useable at the moment it appears interactive. There also isn’t too much time between the first meaningful paint and the first interactive. While these scores are reasonable, the perceptual speed could be higher. In other words, the site appears to be rather fast but still could use some speeding up in the appearance part.
Implementing site speed fixes
Google Lighthouse isn’t the one site speed tool to rule them all, but it is a very valuable addition to your toolkit. The SEO checks are basic, but welcome nonetheless. We know PageSpeed Insights is a fairly static tool that gives you a high-level overview of the performance of your site. Lighthouse, however, is more fine-grained and gives you immediate feedback based on real-world usage. You should definitely use it along with your other page speed test tools, like WebPageTest and GTmetrix.
Are you using Google Lighthouse? How do you find it? Please share your experiences and tips in the comments. Would love to hear from you!