Performance and accessibility review to help design a better user experience
Google Lighthouse is an open-source, automated tool for improving the quality of web pages. It can be run in Chrome DevTools or installed locally and run from the command line.
- Web Dev
- Google Pagespeed Insights
- Google Lighthouse
- Get Started using Lighthouse
- Using Lighthouse on Chrome DevTools
- Using Lighthouse on command line
npm install -g lighthouse
See all options
lighthouse --help
To run an audit, use --output flags to export json, html or both. use --view to view report in browser.
lighthouse https://mysite.ucla.edu --output html --view
lighthouse https://mysite.ucla.edu --output html --output json --view
lighthouse https://mysite.ucla.edu --output html --emulated-form-factor=none --throttling-method=provided --view
lighthouse https://mysite.ucla.edu --output html --emulated-form-factor=none --view
When installed globally via npm i -g lighthouse or yarn global add lighthouse,
chrome-debug is added to your PATH. This binary launches a standalone Chrome
instance with an open debugging port.
- Run
chrome-debug. This will log the debugging port of your Chrome instance - Navigate to your site and log in.
- In a separate terminal tab, run
lighthouse http://mysite.ucla.edu --port port-numberusing the port number from chrome-debug. - ex.
lighthouse https://mysite.ucla.edu --port portnumber --output json --output html --view
Reports are saved in the directory command is run. If you want to output path to another folder use --output-path
ex: lighthouse --output json --output-path <path/for/output.json>
To view a report that's been saved as a Gist:
Add ?gist=<ID> to the Viewer's URL, where <ID> is the ID of the Gist.
https://googlechrome.github.io/lighthouse/viewer/?gist=<ID>
Open the Viewer, and paste the URL of a Gist into it. Or upload the json file.
- Web Fundamentals
- Design and UX Basics
- Auditing Performance
- Accessibilty Basics
- Auditing Accessiblity
You can use this section to save reports and publish them on the web in this repo.