Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 37 ยท Getting Started

Why Web Performance Matters

Learn why page speed shapes user experience, search visibility, accessibility and revenue, and how to think about performance as a feature of every website.

A web page that loads in one second feels instant. A page that takes six seconds feels broken, and many visitors leave before they see anything. Web performance is the craft of making pages load quickly, respond to input immediately and stay smooth while people use them.

This course teaches performance from first principles. You will learn how browsers build a page, which numbers to measure, and which changes to HTML, CSS, JavaScript, images and servers give the biggest wins. In this first lesson you will see why it is worth the effort and how to talk about speed in precise terms.

Speed is a feature

Performance is not a polish step at the end of a project. It is part of the product, like security or accessibility. Slow pages cause real, measurable harm:

  • Lost visitors. People abandon pages that stay blank or janky. Every extra second of waiting loses a share of your audience.
  • Lost money. Shops, sign-up forms and ad-funded sites convert and earn less when pages are slow.
  • Lower search visibility. Search engines use page experience signals, including Core Web Vitals, as part of ranking. Speed alone will not rank a poor page, but a slow page loses ties.
  • Exclusion. Not everyone has a fast laptop and fibre. Many people use mid-range phones on congested mobile networks. A heavy page can be unusable for them.
  • Higher costs. Fewer bytes mean lower bandwidth bills and less battery drain for visitors.

Fast pages help everyone, but they matter most for the people with the weakest devices and connections. If your site works well for them, it works well for all.

Perceived performance

Users do not feel milliseconds on a stopwatch. They feel moments: when did something first appear, when could I read it, when did it react to my tap? Good performance work targets those moments:

Question the user has What it measures Typical goal
Is it happening? First paint, first contentful paint Under about 1.8 s
Is it useful? Largest contentful paint Under 2.5 s
Is it usable? Input responsiveness Under 200 ms
Is it stable? Layout shifts Almost none

You can sometimes improve how fast a page feels without making the total load shorter, for example by showing the text first and loading decorative images later. Skeleton screens, instant visual feedback on taps and loading the top of the page first all improve perception.

A tiny measurement

Before optimising, get used to measuring. The browser exposes a Performance API that records timing for almost everything. This example reads how long the browser spent on the current document, plus the time at which the first paint happened.

Read the browser's own timings

performance.now() returns a high-resolution timestamp in milliseconds since the page started. Subtracting two values gives you the duration of a piece of work. You will meet far richer tools later, but this is the foundation of all of them.

The cost of every byte and every task

Two resources limit page speed:

  1. The network. Every file has to travel from a server to the device. More bytes, more requests and longer distances all add time.
  2. The main thread. One thread in the browser runs JavaScript, calculates styles, lays out the page and paints. While it is busy, the page cannot respond.

Almost every optimisation either sends fewer or smaller things or does less work on the main thread. Keep those two ideas in mind and the rest of the course will feel familiar.

See the main thread block

While that loop runs you cannot click, scroll or select text. Real pages do this by accident with large scripts, and users experience it as a frozen page.

Performance as a habit

Teams that stay fast do three things:

  1. They measure with real data, not guesses.
  2. They set budgets (limits on size and time) so regressions are caught early.
  3. They treat speed as everyone's job, from designers choosing images to developers adding libraries.
flowchart LR
  A["Measure"] --> B["Find the biggest problem"]
  B --> C["Fix one thing"]
  C --> D["Measure again"]
  D --> A

The performance loop: always measure before and after a change.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which statement best describes web performance?

    Performance covers loading, responsiveness and visual stability, as users experience them.
  2. 2. Why does performance matter most to people on weak devices?

    Large downloads and heavy scripts hit low-end phones and slow connections hardest.
  3. 3. What does performance.now() return?

    It is a monotonic timer used to measure durations, such as the time a task takes.
  4. 4. Which pair of resources limits most page speed?

    Pages wait on the network to get files and on the main thread to process them.

Summary

  • Speed affects users, revenue, search visibility, inclusion and cost.
  • Users judge performance by moments: first content, main content, responsiveness and stability.
  • The network and the main thread are the two bottlenecks.
  • Measure first, change one thing, then measure again.

Next: How a Web Page Loads