Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.59 KB

File metadata and controls

52 lines (34 loc) · 1.59 KB

61. Performance audit and optimization

Prioritize improvements using measurements.

Learn

  • measurement
  • asset budget
  • image format decisions
  • font cost
  • layout stability

Build

Record before-and-after measurements for a page and explain each change.

Check your work

  • Open the result in a browser and inspect the HTML and computed CSS.
  • Test at narrow and wide widths and use the keyboard for interactive elements.
  • Write down one thing you changed after testing.

Deep lesson

How it works

A performance audit compares a baseline to measured results. Inspect resource sizes and loading order, then target the dominant cost: images, fonts, CSS, or layout instability. Use consistent test conditions and note whether the change helps the user's main task. A smaller file is not automatically a better experience if it delays visible content or reduces readability.

Common mistake

Optimizing every tiny asset before measuring can waste effort. A single lab score is not a complete account of real usage.

Guided challenge

Measure a page, choose the largest practical bottleneck, make one change, and write a short before-and-after report with the test conditions.

Completion check

  • Rebuild the core idea without copying the example line by line.
  • Explain the key HTML or CSS choice in your own words.
  • Test the result at a narrow width and with keyboard navigation where relevant.

Run the example

Open example.html in a browser. Edit style.css, save, and refresh.

Try: Measure load and layout stability, then explain one useful optimization.