What is the Save-Data header and how should a site respond to it?

IntermediatePerformance interview questionBy , updated 23 November 2026

Short answer

Save-Data: on is an HTTP request header a browser sends when the user has asked to use less data, for example on a costly or slow mobile plan. A site should respond with a lighter experience: smaller images, no autoplaying video, no speculative prefetching, fewer web fonts and less background polling. Pages that change because of it should send Vary: Save-Data so caches keep the two versions apart.

What the signal is

Save-Data is a network client hint. Unlike most client hints, browsers that support it send it on every request without the server asking for it through Accept-CH, because it reveals very little. Its only meaningful value is on, an explicit opt-in by the user; when it is absent, assume no preference.

It is a statement of preference, not a measurement. A user on fast Wi-Fi may still have it on, and a user on a crawling connection may not. Treat it as "the user asked", which is a stronger reason to act than any guess about the network.

Where you can read it

  • On the server or CDN, from the request header. This is the most useful place, because you can change the HTML and the image URLs before anything downloads.
  • In the page, from navigator.connection.saveData, part of the Network Information API. It exists only in Chromium-based browsers, so feature-detect it.
  • In a service worker, from event.request.headers.get("save-data"), which lets you rewrite image requests on the fly.
const saveData = navigator.connection?.saveData === true;
if (!saveData) {
  import("./hero-video.js").then((m) => m.mount(document.querySelector("#hero")));
}

What about prefers-reduced-data?

Media Queries Level 5 defines @media (prefers-reduced-data: reduce), which would let CSS react directly. As of 2026 no stable browser ships it; it has only been available behind experimental flags. Write it as a progressive enhancement if you like, but never rely on it as the only signal.

Be realistic about reach, too. Browser support for Save-Data is limited to Chromium-based browsers, and Chrome's own Lite mode, which used to be the main way users turned it on, was removed in 2022. Fewer requests carry the header than used to. That is a reason to also offer your own in-app data-saver setting and to adapt to measured network quality, not a reason to ignore the header when it arrives.

How to respond

The rule is the same content, fewer bytes. Do not remove features or information; change how much is downloaded to deliver them.

  • Images. Serve lower-resolution and more compressed variants, cap the pixel density at 1x, and prefer AVIF or WebP. On the server this can be as simple as choosing a smaller srcset set or a lower quality parameter on your image CDN. See how to optimise images for the web.
  • Video and animation. Do not autoplay. Show a poster with a play button and use preload="none" so nothing downloads until the user asks. Replace animated GIFs and stickers with still frames.
  • Prefetching. Turn off your own prefetch links, hover prefetching and speculative loading of the next page. Those bytes are spent on a guess, and the user asked you not to guess. Practise this in a hover-intent prefetch scheduler that respects Save-Data.
  • Web fonts. Use the system font stack, or load only the one essential font.
  • Background work. Poll less often, load smaller pages of results, and defer non-essential third-party scripts such as chat widgets.
  • Lazy-load more aggressively below the fold, with a smaller root margin.
// Express-style handler: choose a lighter page and tell caches it varies
app.get("/product/:id", (req, res) => {
  const lite = req.get("Save-Data")?.toLowerCase() === "on";
  res.set("Vary", "Save-Data");
  res.render("product", { lite, imageWidth: lite ? 480 : 1200, autoplay: !lite });
});

Combining the header with other hints into one decision is the job in choosing a loading plan for slow networks, and the design-level version, with quality tiers and a user override, is adaptive media quality for slow networks.

Caching: the Vary header

If the server returns different HTML or images depending on Save-Data, a shared cache must not hand the lite version to someone without the header, or the full version to someone who opted out. Vary: Save-Data tells browser caches and CDNs that the header is part of the cache key. Check that your CDN honours Vary for this header or configure its cache key explicitly, and normalise the value to "on" or absent so you get two variants, not one per spelling. The HTTP caching answer explains how Vary fits with freshness and validation.

If only client-side behaviour changes (autoplay, prefetching) and the HTML is identical, you do not need Vary; decide in the page with navigator.connection.saveData instead.

Follow-up questions interviewers ask

Should Save-Data override the user's own settings?

No. An explicit in-app choice is the most direct statement of what the user wants. Default to the header, and let a setting such as "Data saver: Auto, On, Off" override it in either direction.

How is Save-Data different from the Network Information API's effectiveType?

Save-Data is the user's preference. effectiveType, downlink and rtt are the browser's rounded estimates of connection quality. Honour the preference first, then use the estimates, or your own measurements of download speed, to pick a quality tier.

Does Save-Data affect SEO?

Crawlers do not normally send it, so they see the full page. Keep the content identical across both versions and change only media weight, so there is nothing that looks like cloaking.

How would you know it helped?

Log the data-saver state with your real-user monitoring and compare bytes transferred, LCP and bounce rate for those sessions before and after the change. A lightweight PWA built for this audience is the subject of designing a Flipkart Lite style PWA.

Practise it in code

Interviewers rarely stop at the definition. These questions open in an editor with tests.

  1. Choose a loading plan for slow networks: image quality, prefetching, autoplay and timeouts from network hintsMedium30 min
  2. Build a hover-intent prefetch scheduler: delay, cancel on leave, concurrency and byte budget, and Save-DataMedium40 min
  3. Design adaptive media quality for slow networks: reduced-data mode, quality tiers and user overrideHard45 min
  4. Design a lightweight PWA for low-end Android on slow networks like Flipkart Lite: budgets, app shell, data saving and offlineHard60 min
  5. Prefetch route code on intent without wasting bandwidthMedium35 min