Lighthouse Hands-On 1

Lighthouse Tool Practice

Lighthouse is an open-source automated tool for improving the quality of web pages. It can audit performance, accessibility, progressive web apps, SEO, and more.

How to Access Lighthouse

  1. Open Chrome DevTools by pressing F12 or Ctrl+Shift+I (or Cmd+Option+I on Mac)
  2. Click on the "Lighthouse" tab in the DevTools panel
  3. Alternatively, you can access it through Chrome's menu: More Tools → Developer Tools → Lighthouse

Exercises

  1. Click the buttons in each section below to add elements that will negatively impact Lighthouse scores
  2. Run a Lighthouse audit by selecting either "Timespan" mode (for user interactions) or "Snapshot" mode (for current state)
  3. Review your report and note which specific metrics were affected by the elements you added
  4. Use the "Reset" buttons to fix the issues, then run another Lighthouse audit to compare the improved scores
  5. Pay attention to which categories (Performance, Accessibility, Best Practices, SEO) are most affected by each change

Lighthouse Demo Elements

Performance Test Elements

Performance test area - click buttons above to load test elements

Accessibility Test Elements

Accessibility test area - click buttons above to load test elements

Best Practices Test Elements

Best practices test area - click buttons above to load test elements

SEO Test Elements

SEO test area - click buttons above to load test elements

Pro Tips for Lighthouse

Additional Resources

Expert Advice

Understanding Lighthouse Scores

Lighthouse scores are calculated based on a set of audits for each category:

Remember that scores can vary between runs due to network conditions and device performance. Focus on the specific recommendations rather than just the overall score.

Common Lighthouse Issues and Fixes