How to test your Site with Google Lighthouse?

A brand new device from Google is to check and provide you with suggestions to enhance efficiency, search engine optimisation, safety, greatest practices and accessibility.

Google just lately launched Lighthouse, an open-source device that means that you can manually and robotically monitor your web site.

What metrics are examined by Google Lighthouse?

There are over 75 stats it assessments and offers you an total rating. You could be desirous about a few of the following common websites as a website proprietor, search engine optimisation analyst and webmaster.

  • Efficiency – time to interactive, latency, pace index, useful resource optimization, TTFB, asset supply, script execution time, DOM dimension, and so forth.
  • search engine marketing – Cell pleasant, meta, crawling, canonical, construction, and so forth.
  • Greatest Practices – Picture optimization, JS libraries, browser error logging, accessible by way of HTTPS, identified JS vulnerabilities, and so forth.
  • Accessibility – Web page components, language, ARIA attributes, and so forth.
  • PWA (Progressive net software) – Redirect HTTP to HTTPS, response code okay, quick loading on 3G, splash display screen, viewport, and so forth.

It is a incredible device and you need to use it in a number of methods.

That is proper – in so some ways. If you’re a developer, you need to use Node.js to run a take a look at programmatically. There are already a lot of instruments in the marketplace, powered by Lighthouse, that present steady website efficiency monitoring.

Let’s examine easy methods to run the lighthouse take a look at in your website.

Begin with the simplest.

Measure by way of net.dev

Google launched net.dev a couple of months in the past and it has develop into fairly common. On-line testing is simple.

Go to the Measure web page and enter the URL to run the audit. It can take a couple of seconds and you need to see the detailed report with the general rating.

The outcomes additionally present that the success statistics take a look at for the profitable audits and the work on them wants consideration.

Do not spend an excessive amount of time attending to 100. Even Google’s websites do not rating that.

Take into account them pointers and attempt to enhance as a lot as attainable.

Comment: net.dev emulates a take a look at utilizing a cell system, and on the time of writing I do not see an choice to check utilizing Desktop.

Chrome

Have you learnt that Lighthouse is on the market in your Chrome browser? And the excellent news is which you could select to check by way of cell or desktop, and it is accessible within the developer instruments.

  • Open the Chrome browser
  • Go to your website to check
  • Open Developer Instruments (press F12 in case you are utilizing Home windows) or right-click the web page and click on Examine.
  • Go to the audits tab.

As you may see above, you might have the choice to decide on what you need to take a look at. That is nice for focusing in your objective and getting audit outcomes sooner.

The feel and appear of the outcomes from Chome and net.dev are just about the identical.

However for those who look carefully, there’s an extra group of metrics right here: Progressive net app. One more reason to audit with Chrome.

Geekflare Lighthouse API

You may as well get the net efficiency information utilizing the Geekflare Lighthouse API. Retrieves Lighthouse stats for cell or desktop with only one click on in HTML, JSON, or CSV format.

geekflare lighthouse api

You may as well customise the report by altering the output format and/or specializing in a specific metric akin to search engine optimisation.

{
  "parameters": [
      "--output=html",
      "--only-categories=seo",
  ],
  "url": "instance.com"
}

And fortunately, we’ve one no-obligation free tier that comes with 3000 API calls per thirty days. Nevertheless, the paid variations add multi-location help, residential proxy, and better request charges, beginning at simply $5 per thirty days.

Node.js

Lighthouse is on the market as a Node module. You’ll be able to set up it in your server and use it programmatically or by way of the command line. Let’s take a fast have a look at easy methods to set up Lighthouse to run some assessments.

Set up Lighthouse on Ubuntu 18.x

The next I’ve examined on the DigitalOcean server. Lighthouse requires Node LTS 8.9 or greater, and I assume you have already got this put in. If not, see this Node.js set up information.

You even have one chrome browser to put in on the server. I’ve reviewed the set up directions right here.

Putting in Lighthouse is simple, similar to different modules.

  • Login to your server
  • Run the next command to put in
npm set up -g lighthouse

I take advantage of -g right here in order that it’s put in as a world module.

root@geekflarelab:~# npm set up -g lighthouse
/usr/bin/lighthouse -> /usr/lib/node_modules/lighthouse/lighthouse-cli/index.js
/usr/bin/chrome-debug -> /usr/lib/node_modules/lighthouse/lighthouse-core/scripts/manual-chrome-launcher.js

> [email protected] postinstall /usr/lib/node_modules/lighthouse/node_modules/axe-core
> node construct/utils/postinstall.js

+ [email protected]
added 179 packages from 119 contributors in 10.094s
root@geekflarelab:~#

As soon as put in, run lighthouse command to ensure it put in appropriately.

root@geekflarelab:~# lighthouse
Please present a url

Specify --help for accessible choices
root@geekflarelab:~#

All proper, the lighthouse is able to conduct the audit. Let’s attempt some testing choices.

Run a take a look at with a headless browser

lighthouse URL --chrome-flags="--headless"

You should specify an absolute URL, together with HTTP or HTTPS.

Ex:

chandan@geekflarelab:~$ lighthouse https://geekflare.com --chrome-flags="--headless"
  ChromeLauncher Ready for browser. +0ms
  ChromeLauncher Ready for browser... +1ms
  ChromeLauncher Ready for browser..... +511ms
  ChromeLauncher Ready for browser.....✓ +2ms
  standing Connecting to browser +176ms
  standing Resetting state with <a href="https://geekflare.com/aboutblank-in-chrome-firefox-safari/">about:clean</a> +24ms
  standing Benchmarking machine +30ms
  standing Initializing… +508ms
  standing Loading web page & ready for onload Scripts, CSSUsage, Viewport, ViewportDimensions, ThemeColor, Manifest, RuntimeExceptions, ChromeConsoleMessages, ImageUsage, Accessibility, LinkElements, AnchorsWithNoRelNoopener, AppCacheManifest, Doctype, DOMStats, JSLibraries, OptimizedImages, PasswordInputsWithPreventedPaste, ResponseCompression, TagsBlockingFirstPaint, MetaDescription, FontSize, CrawlableLinks, MetaRobots, Hreflang, EmbeddedContent, Canonical, RobotsTxt +27ms
  standing Retrieving in-page: Scripts +2s
  standing Retrieving in-page: CSSUsage +0ms
  standing Retrieving in-page: Viewport +0ms
  standing Retrieving in-page: ViewportDimensions +0ms
  standing Retrieving in-page: ThemeColor +0ms
  standing Retrieving in-page: Manifest +0ms
  standing Retrieving in-page: RuntimeExceptions +0ms
  standing Retrieving in-page: ChromeConsoleMessages +0ms
  standing Retrieving in-page: ImageUsage +0ms
  standing Retrieving in-page: Accessibility +0ms
  standing Retrieving in-page: LinkElements +0ms
  standing Retrieving in-page: AnchorsWithNoRelNoopener +1ms
  standing Retrieving in-page: AppCacheManifest +0ms
  standing Retrieving in-page: Doctype +0ms
  standing Retrieving in-page: DOMStats +0ms
  standing Retrieving in-page: JSLibraries +0ms
  standing Retrieving in-page: OptimizedImages +0ms
  standing Retrieving in-page: PasswordInputsWithPreventedPaste +0ms
  standing Retrieving in-page: ResponseCompression +0ms
  standing Retrieving in-page: TagsBlockingFirstPaint +0ms
  standing Retrieving in-page: MetaDescription +0ms
  standing Retrieving in-page: FontSize +0ms
  standing Retrieving in-page: CrawlableLinks +0ms
  standing Retrieving in-page: MetaRobots +0ms
  standing Retrieving in-page: Hreflang +0ms
  standing Retrieving in-page: EmbeddedContent +0ms
  standing Retrieving in-page: Canonical +0ms
  standing Retrieving in-page: RobotsTxt +0ms
  standing Retrieving hint +1ms
  standing Retrieving devtoolsLog & community information +110ms
  standing Retrieving: Scripts +27ms
  standing Retrieving: CSSUsage +53ms
  standing Retrieving: Viewport +192ms
  standing Retrieving: ViewportDimensions +5ms
  standing Retrieving: ThemeColor +13ms
  standing Retrieving: Manifest +2ms
  standing Retrieving: RuntimeExceptions +295ms
  standing Retrieving: ChromeConsoleMessages +1ms
  standing Retrieving: ImageUsage +2ms
  standing Retrieving: Accessibility +22ms
  standing Retrieving: LinkElements +526ms
  standing Retrieving: AnchorsWithNoRelNoopener +10ms
  standing Retrieving: AppCacheManifest +6ms
  standing Retrieving: Doctype +20ms
  standing Retrieving: DOMStats +4ms
  standing Retrieving: JSLibraries +50ms
  standing Retrieving: OptimizedImages +25ms
  standing Retrieving: PasswordInputsWithPreventedPaste +234ms
  standing Retrieving: ResponseCompression +3ms
  standing Retrieving: TagsBlockingFirstPaint +7ms
  standing Retrieving: MetaDescription +6ms
  standing Retrieving: FontSize +7ms
  standing Retrieving: CrawlableLinks +245ms
  standing Retrieving: MetaRobots +6ms
  standing Retrieving: Hreflang +2ms
  standing Retrieving: EmbeddedContent +2ms
  standing Retrieving: Canonical +3ms
  standing Retrieving: RobotsTxt +6ms
  standing Resetting state with <a href="https://geekflare.com/aboutblank-in-chrome-firefox-safari/">about:clean</a> +19ms
  standing Loading web page & ready for onload ServiceWorker, Offline, StartUrl +24ms
  standing Retrieving in-page: ServiceWorker +59ms
  standing Retrieving in-page: Offline +0ms
  standing Retrieving in-page: StartUrl +1ms
  standing Retrieving devtoolsLog & community information +0ms
  standing Retrieving: ServiceWorker +2ms
  standing Retrieving: Offline +1ms
  standing Retrieving: StartUrl +1ms
  standing Resetting state with <a href="https://geekflare.com/aboutblank-in-chrome-firefox-safari/">about:clean</a> +5ms
  standing Loading web page & ready for onload HTTPRedirect, HTMLWithoutJavaScript +48ms
  standing Retrieving in-page: HTTPRedirect +260ms
  standing Retrieving in-page: HTMLWithoutJavaScript +0ms
  standing Retrieving devtoolsLog & community information +0ms
  standing Retrieving: HTTPRedirect +7ms
  standing Retrieving: HTMLWithoutJavaScript +12ms
  standing Disconnecting from browser... +7ms
  standing Analyzing and working audits... +6ms
  standing Evaluating: Makes use of HTTPS +3ms
  standing Evaluating: Redirects HTTP site visitors to HTTPS +24ms
  standing Evaluating: Registers a service employee that controls web page and start_url +1ms
  standing Evaluating: Present web page responds with a 200 when offline +0ms
  standing Evaluating: Has a `<meta identify="viewport">` tag with `width` or `initial-scale` +1ms
  standing Evaluating: Accommodates some content material when JavaScript will not be accessible +1ms
  standing Evaluating: First Contentful Paint +6ms
  standing Evaluating: First Significant Paint +54ms
  standing Evaluating: Web page load is quick sufficient on cell networks +10ms
  standing Evaluating: Velocity Index +33ms
  standing Evaluating: Screenshot Thumbnails +529ms
  standing Evaluating: Remaining Screenshot +287ms
  standing Evaluating: Estimated Enter Latency +2ms
  standing Evaluating: No browser errors logged to the console +16ms
  standing Evaluating: Server response instances are low (TTFB) +1ms
  standing Evaluating: First CPU Idle +1ms
  standing Evaluating: Time to Interactive +30ms
  standing Evaluating: Person Timing marks and measures +0ms
  standing Evaluating: Reduce Important Requests Depth +2ms
  standing Evaluating: Keep away from a number of web page redirects +3ms
  standing Evaluating: Internet app manifest meets the installability necessities +2ms
  standing Evaluating: Configured for a customized splash display screen +1ms
  standing Evaluating: Units an address-bar theme coloration +0ms
  standing Evaluating: Content material is sized appropriately for the viewport +1ms
  standing Evaluating: Shows pictures with appropriate facet ratio +0ms
  standing Evaluating: Avoids deprecated APIs +1ms
  standing Evaluating: Minimizes main-thread work +0ms
  standing Evaluating: JavaScript execution time +11ms
  standing Evaluating: Preload key requests +3ms
  standing Evaluating: Preconnect to required origins +2ms
  standing Evaluating: All textual content stays seen throughout webfont masses +2ms
  standing Evaluating: Community Requests +1ms
  standing Evaluating: Metrics +2ms
  standing Evaluating: start_url responds with a 200 when offline +1ms
  standing Evaluating: Website works cross-browser +1ms
  standing Evaluating: Web page transitions do not feel like they block on the community +0ms
  standing Evaluating: Every web page has a URL +0ms
  standing Evaluating: `[aria-*]` attributes match their roles +1ms
  standing Evaluating: `[role]`s have all required `[aria-*]` attributes +1ms
  standing Evaluating: Components with `[role]` that require particular youngsters `[role]`s, are current +0ms
  standing Evaluating: `[role]`s are contained by their required guardian component +1ms
  standing Evaluating: `[role]` values are legitimate +1ms
  standing Evaluating: `[aria-*]` attributes have legitimate values +0ms
  standing Evaluating: `[aria-*]` attributes are legitimate and never misspelled +1ms
  standing Evaluating: `<audio>` components include a `<observe>` component with `[kind="captions"]` +1ms
  standing Evaluating: Buttons have an accessible identify +1ms
  standing Evaluating: The web page incorporates a heading, skip hyperlink, or landmark area +1ms
  standing Evaluating: Background and foreground colours have a adequate distinction ratio +1ms
  standing Evaluating: `<dl>`'s include solely properly-ordered `<dt>` and `<dd>` teams, `<script>` or `<template>` components. +1ms
  standing Evaluating: Definition checklist gadgets are wrapped in `<dl>` components +0ms
  standing Evaluating: Doc has a `<title>` component +1ms
  standing Evaluating: `[id]` attributes on the web page are distinctive +1ms
  standing Evaluating: `<body>` or `<iframe>` components have a title +1ms
  standing Evaluating: `<html>` component has a `[lang]` attribute +0ms
  standing Evaluating: `<html>` component has a sound worth for its `[lang]` attribute +1ms
  standing Evaluating: Picture components have `[alt]` attributes +1ms
  standing Evaluating: `<enter kind="picture">` components have `[alt]` textual content +1ms
  standing Evaluating: Kind components have related labels +0ms
  standing Evaluating: Presentational `<desk>` components keep away from utilizing `<th>`, `<caption>` or the `[summary]` attribute. +1ms
  standing Evaluating: Hyperlinks have a discernible identify +1ms
  standing Evaluating: Lists include solely `<li>` components and script supporting components (`<script>` and `<template>`). +1ms
  standing Evaluating: Checklist gadgets (`<li>`) are contained inside `<ul>` or `<ol>` guardian components +1ms
  standing Evaluating: The doc doesn't use `<meta http-equiv="refresh">` +0ms
  standing Evaluating: `[user-scalable="no"]` will not be used within the `<meta identify="viewport">` component and the `[maximum-scale]` attribute will not be lower than 5. +1ms
  standing Evaluating: `<object>` components have `[alt]` textual content +1ms
  standing Evaluating: No component has a `[tabindex]` worth better than 0 +1ms
  standing Evaluating: Cells in a `<desk>` component that use the `[headers]` attribute solely confer with different cells of that very same desk. +1ms
  standing Evaluating: `<th>` components and components with `[role="columnheader"/"rowheader"]` have information cells they describe. +0ms
  standing Evaluating: `[lang]` attributes have a sound worth +1ms
  standing Evaluating: `<video>` components include a `<observe>` component with `[kind="captions"]` +1ms
  standing Evaluating: `<video>` components include a `<observe>` component with `[kind="description"]` +1ms
  standing Evaluating: `[accesskey]` values are distinctive +1ms
  standing Evaluating: Customized controls have related labels +0ms
  standing Evaluating: Customized controls have ARIA roles +1ms
  standing Evaluating: Person focus will not be by chance trapped in a area +0ms
  standing Evaluating: Interactive controls are keyboard focusable +0ms
  standing Evaluating: Headings do not skip ranges +0ms
  standing Evaluating: Interactive components point out their objective and state +1ms
  standing Evaluating: The web page has a logical tab order +0ms
  standing Evaluating: The person's focus is directed to new content material added to the web page +1ms
  standing Evaluating: Offscreen content material is hidden from assistive know-how +0ms
  standing Evaluating: HTML5 landmark components are used to enhance navigation +0ms
  standing Evaluating: Visible order on the web page follows DOM order +0ms
  standing Evaluating: Makes use of environment friendly cache coverage on static property +1ms
  standing Evaluating: Avoids huge community payloads +3ms
  standing Evaluating: Defer offscreen pictures +1ms
  standing Evaluating: <a href="https://geekflare.com/eliminate-render-blocking-wordpress-plugins/">Eradicate render-blocking sources</a> +12ms
  standing Evaluating: Minify CSS +28ms
  standing Evaluating: Minify JavaScript +64ms
  standing Evaluating: Defer unused CSS +69ms
  standing Evaluating: Serve pictures in next-gen codecs +12ms
  standing Evaluating: Effectively encode pictures +11ms
  standing Evaluating: Allow textual content compression +6ms
  standing Evaluating: Correctly dimension pictures +6ms
  standing Evaluating: Use video codecs for animated content material +7ms
  standing Evaluating: Avoids Software Cache +11ms
  standing Evaluating: Web page has the HTML doctype +0ms
  standing Evaluating: Avoids an extreme DOM dimension +1ms
  standing Evaluating: Hyperlinks to cross-origin locations are protected +2ms
  standing Evaluating: Avoids requesting the geolocation permission on web page load +1ms
  standing Evaluating: Avoids `doc.write()` +0ms
  standing Evaluating: Avoids front-end JavaScript libraries with identified safety vulnerabilities +0ms
  standing Evaluating: Detected JavaScript libraries +9ms
  standing Evaluating: Avoids requesting the notification permission on web page load +1ms
  standing Evaluating: Permits customers to stick into password fields +0ms
  standing Evaluating: Makes use of HTTP/2 for its personal sources +0ms
  standing Evaluating: Makes use of passive listeners to enhance scrolling efficiency +1ms
  standing Evaluating: Doc has a meta description +0ms
  standing Evaluating: Web page has profitable HTTP standing code +1ms
  standing Evaluating: Doc makes use of legible font sizes +5ms
  standing Evaluating: Hyperlinks have descriptive textual content +1ms
  standing Evaluating: Web page isn’t blocked from indexing +1ms
  standing Evaluating: robots.txt is legitimate +2ms
  standing Evaluating: Doc has a sound `hreflang` +1ms
  standing Evaluating: Doc avoids plugins +1ms
  standing Evaluating: Doc has a sound `rel=canonical` +0ms
  standing Evaluating: Web page is cell pleasant +1ms
  standing Evaluating: Structured information is legitimate +0ms
  standing Producing outcomes... +0ms
  ChromeLauncher Killing Chrome occasion 7098 +59ms
  Printer html output written to /dwelling/chandan/geekflare.com_2019-01-20_19-29-35.report.html +46ms
  CLI Protip: Run lighthouse with `--view` to instantly open the HTML report in your browser +1ms

Within the penultimate line, you may see that the trail is printed to seek out the report. By default, it generates a report in HTML format, which you’ll view by downloading it to your PC or displaying it by way of an online server.

However what if it’s essential generate a report in JSON format?

It may be finished as follows.

lighthouse URL --chrome-flags="--headless" --output json --output-path URL.json

Through the use of Lighthouse CLI you might have full management to make use of it the best way you need. I extremely suggest trying out the GitHub repository for extra info on utilizing CLI or programmatically.

Conclusion

Google Lighthouse looks like a promising device to run a continuity take a look at to enhance website efficiency and usefulness. If you happen to use WordPress and wish your website to load sooner, try Rocket.

Leave a Comment

porno izle altyazılı porno porno