Most slow gaming sites are not slow because of one mistake. They are slow because four independent systems each add a little delay, and the delays are serial. The network has to deliver bytes, the browser has to turn those bytes into a rendered page, JavaScript has to run before the page becomes usable, and then an embedded game has its own loading phase on top of all that. Improving any one of them helps; understanding the order they happen in is what lets you decide which one to fix first.

This guide is the map. The other guides in the series go deep on each territory.

Where the time goes

A typical gaming page is a content page wrapped around an application. The outer page carries navigation, text, images and third-party scripts. The inner application is the game: a JavaScript runtime, a canvas, and a pile of textures and audio. The two have different performance characteristics and are usually built by different teams, which is how a page can pass every page-level audit and still feel slow when the game starts.

PhaseWhat happensTypical cause of delayGuide
ConnectDNS, TCP, TLS, first requestfar-away origin, no CDN, redirectsLatency
DeliverHTML, CSS, JS, images arriveuncompressed or oversized assets, no cachingAssets, CDN & caching
Renderparse, style, layout, paintrender-blocking CSS and scripts, large DOMthis page, Core Web Vitals
ExecuteJavaScript runs, page becomes interactivelong tasks, third-party scripts, hydrationCore Web Vitals
Load gameruntime boots, assets stream, first frameeverything fetched before anything is shownHTML5 gaming
Playinput, update, render each frameframe budget exceeded, input blocked by long tasksHTML5 gaming, Mobile UX

The browser rendering pipeline

Everything the user sees goes through the same sequence. The browser parses HTML into the Document Object Model (DOM) and CSS into the CSS Object Model (CSSOM), combines the two into a render tree of visible boxes, computes each box's geometry in layout, paints pixels into layers, and composites the layers into a frame. JavaScript sits beside this pipeline and can change the DOM or styles at any time, which sends the affected part of the page back through layout and paint.

Browser rendering pipeline HTML bytes are parsed into the DOM, CSS bytes into the CSSOM, and the two combine into the render tree. Layout computes geometry, paint produces pixels per layer, and compositing produces the final frame on the GPU. JavaScript executes on the main thread and can mutate the DOM and CSSOM, which re-triggers the pipeline. Stylesheets block the render tree; synchronous scripts block HTML parsing. HTML bytesnetworkCSS bytesnetworkJavaScriptnetworkDOMparse HTMLCSSOMparse CSSScript executionmain threadRender treeDOM × CSSOMLayoutgeometryPaintpixels per layerCompositeGPU, final framemutates DOM / CSSOMRender-blocking: CSS must be parsed before the render tree exists.A synchronous <script> halts HTML parsing until it has run.
Rendering pipeline. HTML → DOM, CSS → CSSOM, both → render tree → layout → paint → composite. Script execution sits beside the pipeline and can restart it by changing the DOM or styles.

Two facts about this pipeline explain most first-load slowness:

  • CSS is render-blocking. The browser will not build the render tree, and so will not paint anything, until every stylesheet it has discovered has arrived and been parsed. A single slow stylesheet from a third-party origin delays the first paint of the entire page.
  • Synchronous scripts are parser-blocking. A plain <script src> in the document stops HTML parsing until the script is downloaded and executed, because the script might write to the document. Scripts marked defer or async, or loaded as modules, do not block the parser.

MDN's guide to how browsers work and web.dev's critical rendering path article both walk through this sequence in detail. The practical consequence is simple: anything the first paint does not need should not be in the critical path. Inline the small amount of CSS that styles the above-the-fold view, defer the rest, and never put a synchronous third-party script in the <head>.

Metrics: lab versus field

Performance is measured in two very different ways, and conflating them causes bad decisions.

Lab data comes from a tool such as Lighthouse or the DevTools Performance panel loading the page in a controlled environment with a simulated network and CPU. It is reproducible and great for diagnosing a problem, but it is one device, one network, one moment.

Field data comes from real users' browsers reporting what they experienced. The Chrome UX Report (CrUX) aggregates this for public origins, and the Core Web Vitals thresholds are defined against it: a page is assessed at the 75th percentile of real page loads, separately for mobile and desktop. Field data captures the user on a three-year-old phone on a congested cell network, which no lab run will.

web.dev's article on why lab and field data differ lists the usual reasons: different devices, caching state, user interaction patterns, and the fact that lab tools measure only the load, not what happens when the user later taps a button. For a gaming page, the gap is often largest on responsiveness, because the lab never plays the game.

The Core Web Vitals in one paragraph

Largest Contentful Paint (LCP) is when the largest visible image or text block has rendered; good is 2.5 seconds or less. Interaction to Next Paint (INP) is how long the page takes to visually respond to a tap, click or key press, reported for roughly the slowest interaction of the visit; good is 200 milliseconds or less. Cumulative Layout Shift (CLS) is how much visible content moved unexpectedly; good is 0.1 or less. All three are assessed at the 75th percentile. The Core Web Vitals guide explains how each is calculated and what breaks it on a game page.

Long tasks and the main thread

The browser runs JavaScript, style, layout and paint for a page on a single main thread. A task that occupies that thread for more than 50 milliseconds is a long task, and while it runs the page cannot respond to input or paint a frame. A game runtime that boots by parsing a multi-megabyte bundle, decoding a dozen images and building its scene graph in one go will produce a long task lasting hundreds of milliseconds. Any tap that lands during it waits.

Fixes come in two shapes. Do less work: ship less JavaScript, decode images off the main thread, avoid rebuilding the DOM. Or split the work: yield between chunks so the browser can paint and handle input in the gaps. web.dev's guide to optimizing long tasks covers the yielding patterns, and the Long Animation Frames API exposes which scripts caused the slow frames in the field.

Network latency

Before any of the above can start, the browser needs the HTML. Resolving the hostname, opening a connection, negotiating TLS and waiting for the server's first byte together form Time to First Byte (TTFB). Each of those steps is a round trip, and on a mobile network a round trip can be 100 milliseconds or more. The latency guide separates the network, server, rendering and interaction components and shows how a CDN removes most of the distance.

Responsive interfaces

A gaming interface is used on a phone far more often than on a desktop. The game frame has to resize with its container, controls have to be large enough for a thumb, portrait and landscape have to both work, and nothing may overflow horizontally. These are layout decisions, not performance decisions, but they interact: a layout that forces a reflow on every orientation change or scrolls horizontally because of a fixed-width canvas is both slow and unusable. The mobile UX guide treats them together.

How to use this series

  1. Measure in the field if you can (CrUX, or your own Real User Monitoring), and in the lab regardless. Know which of the six phases above is the problem before touching anything.
  2. Fix the critical path first: TTFB, render-blocking resources, the LCP image. These affect every visit.
  3. Then fix interaction: long tasks, third-party scripts, the game's boot sequence.
  4. Then fix the game's own loading: manifest-driven asset streaming, atlases, compressed audio, deferred scenes.
  5. Run the performance checklist at the end, not the beginning, as a review rather than a plan.

Sources

Primary documentation consulted for this guide. Thresholds and API behaviour were checked against these pages on 2026-11-02.

  1. Populating the page: how browsers work — MDN Web Docs
  2. Critical rendering path — MDN Web Docs
  3. Critical rendering path — web.dev
  4. Web Vitals — web.dev
  5. Why lab and field data can be different — web.dev
  6. Optimize long tasks — web.dev
  7. Long animation frame timing — MDN Web Docs
  8. DevTools Performance panel — Chrome for Developers
  9. Lighthouse overview — Chrome for Developers
  10. Chrome UX Report (CrUX) — Chrome for Developers