Skip to content
Tutorials Center
My learning

Topics

Web Performance Tutorial

Learn Web Performance step by step: 37 lessons in 9 chapters with examples, quizzes, diagrams and projects.

Start learning →

of lessons completed

Getting Started

  1. 1 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.
  2. 2 How a Web Page Loads Follow a request from the address bar to pixels on screen: DNS, connection, TLS, response, parsing, subresources and rendering, and see where time is lost.
  3. 3 How Browsers Render a Page Understand how the browser turns HTML, CSS and JavaScript into pixels, which resources block parsing or rendering, and how to shorten the path to the first paint.
  4. 4 Lab Data and Field Data Learn the difference between synthetic lab tests and real user field data, when each is useful, how percentiles work, and how to avoid misleading averages.

Metrics and Core Web Vitals

  1. 5 Core Web Vitals Overview Meet the three Core Web Vitals, Largest Contentful Paint, Interaction to Next Paint and Cumulative Layout Shift, with thresholds, how they are judged and how to read them.
  2. 6 Largest Contentful Paint (LCP) Learn what Largest Contentful Paint measures, which elements count, its four timing parts, and practical fixes for slow server responses, late images and render delay.
  3. 7 Interaction to Next Paint (INP) Understand how INP measures page responsiveness, its three phases (input delay, processing, presentation), and how to break up long tasks and keep the main thread free.
  4. 8 Cumulative Layout Shift (CLS) Learn how Cumulative Layout Shift is calculated, what causes content to jump, and how to prevent shifts with image dimensions, aspect ratios, reserved space and careful loading.
  5. 9 TTFB, FCP and Other Performance Metrics Learn the supporting performance metrics beyond Core Web Vitals, including TTFB, First Contentful Paint, Total Blocking Time, Speed Index and Time to Interactive, and when to use each.

Network and Caching

  1. 10 HTTP Requests and Network Latency Understand latency, bandwidth, round trips and connection costs, why many small requests hurt, and how to estimate download time and reduce the number of round trips.
  2. 11 HTTP Caching Headers Learn how browser and HTTP caching works, with Cache-Control, max-age, ETag, Last-Modified and immutable, plus a caching strategy for HTML, assets and APIs.
  3. 12 CDN and Edge Caching Learn how a content delivery network shortens round trips, what to cache at the edge, how cache keys, TTLs and purging work, and how to avoid caching private data.
  4. 13 Compression, HTTP/2 and HTTP/3 Learn how Gzip and Brotli compression shrink text assets, how minification differs, and how HTTP/2 multiplexing and HTTP/3 over QUIC make requests cheaper.
  5. 14 Resource Hints and Priorities Learn how browsers prioritise requests, and how preload, preconnect, dns-prefetch, prefetch, fetchpriority and 103 Early Hints help the browser fetch the right things sooner.

Images, Fonts and Media

  1. 15 Image Formats and Sizes Choose between JPEG, PNG, WebP, AVIF, GIF and SVG, learn lossy versus lossless compression, how pixel dimensions drive file size, and how to compress images for the web.
  2. 16 Responsive Images and Lazy Loading Serve the right image to each screen with srcset, sizes and the picture element, add format fallbacks, and defer offscreen images with loading=lazy without hurting LCP.
  3. 17 Web Fonts and Performance Load custom fonts fast with WOFF2, subsetting, font-display, preload and variable fonts, and avoid invisible text and layout shifts with matched fallback metrics.
  4. 18 Video and Audio Performance Keep pages fast with video and audio: choose codecs and containers, use poster images, preload and autoplay correctly, avoid GIFs, lazy-load embeds, and stream adaptively.

JavaScript Performance

  1. 19 The Main Thread and Long Tasks Learn why one slow function freezes a page, how to spot long tasks over 50 ms, and how to break up work so clicks and typing stay responsive.
  2. 20 Loading Scripts: async, defer and Modules Understand how a plain script tag blocks HTML parsing, and when to use defer, async, type=module, preload and dynamic import to load JavaScript faster.
  3. 21 Bundle Size and Code Splitting Learn why JavaScript costs more than images of the same size, how compression, tree shaking and code splitting shrink bundles, and how to lazy load code.
  4. 22 Debounce, Throttle and Idle Work Stop scroll, resize and input events from flooding the main thread. Learn debounce, throttle, passive listeners, requestAnimationFrame and idle callbacks.
  5. 23 Web Workers: Moving Work Off the Main Thread Use Web Workers to run heavy calculations in parallel, keep the page responsive, pass data efficiently with transferables and know when a worker is not worth it.
  6. 24 Finding and Fixing Memory Leaks Learn how garbage collection works, the five most common leak patterns (listeners, timers, closures, detached DOM, caches) and how to find them in DevTools.

CSS and Rendering

  1. 25 The Critical Rendering Path Follow the steps a browser takes from HTML bytes to pixels: DOM, CSSOM, render tree, layout, paint and composite, and learn which steps you can speed up.
  2. 26 Render-Blocking CSS and Critical CSS Reduce the CSS that blocks first paint. Learn critical CSS inlining, media attributes, non-blocking stylesheet loading, @import pitfalls and unused CSS cleanup.
  3. 27 Layout Thrashing and Reflow Understand forced synchronous layout, why mixing DOM reads and writes in a loop is slow, and how to batch with requestAnimationFrame, fragments and ResizeObserver.
  4. 28 Containment, content-visibility and Smooth Animations Speed up rendering with CSS contain and content-visibility, animate with transform and opacity, use will-change wisely and respect prefers-reduced-motion.

Measuring and Monitoring

  1. 29 Lighthouse, PageSpeed and Lab Testing Run Lighthouse and PageSpeed Insights correctly, read the score and the opportunities, control throttling and variance, and avoid common lab testing mistakes.
  2. 30 The Performance API and Real-User Monitoring Measure real visitors with the browser Performance API. Use marks, measures, PerformanceObserver for Web Vitals, percentiles and sendBeacon to build real-user monitoring.
  3. 31 A DevTools Profiling Workflow A repeatable method to find a slow page's real bottleneck with Chrome DevTools: Network waterfall, Performance recording, flame chart, long tasks and Insights.
  4. 32 Synthetic Monitoring and Alerts Combine scheduled synthetic tests with RUM to catch performance regressions early, set sensible alert thresholds, avoid noisy alarms and tie changes to releases.

Performance Budgets and Culture

  1. 33 Performance Budgets Define a performance budget with limits for metrics, file sizes and request counts, choose realistic numbers from data, and enforce them in your build and pull requests.
  2. 34 Performance in CI and Team Culture Automate performance checks with Lighthouse CI in pull requests, review third-party scripts, make speed visible, and build habits that keep a fast site fast.

Projects and Practice

  1. 35 Project: Fix a Slow Page A hands-on project. Audit a deliberately slow landing page, find five problems, apply the fixes step by step and compare the before and after results.
  2. 36 Project: A Tiny Real-User Monitor Build a small real-user monitoring script that collects navigation timing, LCP, CLS and slow interactions, batches them, and summarizes p75 values like a dashboard.
  3. 37 Practice: A Performance Audit Checklist Put it all together with a step-by-step audit checklist for any website, practice scenarios to diagnose, a self-scoring tool and ideas for your next steps.