Preload Playground

Each card below uses a resource fetched by a different resource hint. Open DevTools → Network (or watch the server log) to see when each request fires.

preload · fetch

loading…

preload · fetch (static JSON)

    modulepreload

    loading…

    preload · script

    loading…

    preload · audio

    dns-prefetch · preconnect

    Nothing on the page uses these two origins until you press the button, so the hints had time to finish. Compare the DNS and connect times.

    prefetch / prerender

    The next page was prefetched and (in Chromium) prerendered.

    Go to next page →

    Timing

    ResourceTypeStart (ms)Duration (ms)

    How the resource hints differ

    dns-prefetch

    Only resolves the hostname. Cheapest hint; useful for many third-party hosts you might touch later.

    preconnect

    DNS lookup, TCP handshake and (for HTTPS) TLS negotiation, all done ahead of time. The first request to that origin skips straight to sending headers. Browsers close unused connections after ~10 s, so add it shortly before you need it, which is what the gallery below does as you scroll.

    preload

    A high-priority fetch of a resource this page will definitely use. as sets priority, the Accept header and the CSP rules; a mismatch means the browser downloads it twice.

    modulepreload

    Like preload for ES modules, but it also parses and compiles the module and can follow its imports.

    prefetch

    A low-priority fetch, stored in the HTTP cache, for something a future navigation will need.

    Speculation rules

    Chromium can prefetch or fully prerender whole pages so that navigating to them is instant.

    End of the gallery.