prefers-reduced-data CSS media feature

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Note: This feature is not supported by any user agent and its specifics are subject to change.

The prefers-reduced-data CSS media feature is used to detect if the user has requested the web content that consumes less internet traffic.

Syntax

no-preference

Indicates that the user has made no preference known to the system. This keyword value evaluates as false in the boolean context.

reduce

Indicates that user has expressed the preference for lightweight alternate content.

User preferences

Currently no user agent implements this feature, although various operating systems do support such preferences and if this media query is ever implemented user agents will likely rely on the settings provided by the operating system.

Examples

Note: No browser currently implements this feature so the following example will not work.

In this example the montserrat-regular.woff2 font file will neither be preloaded nor downloaded if the user prefers reduced data, in this case the "system font stack" will serve as the fallback font:

HTML

html
<head>
  <link
    rel="preload"
    href="fonts/montserrat-regular.woff2"
    as="font"
    media="(prefers-reduced-data: no-preference)"
    crossorigin />
  <link rel="stylesheet" href="style.css" />
</head>

CSS

css
@media (prefers-reduced-data: no-preference) {
  @font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: normal;
    font-display: swap;
    /* latin */
    src:
      local("Montserrat Regular"),
      local("Montserrat-Regular"),
      url("fonts/montserrat-regular.woff2") format("woff2");
    unicode-range:
      U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
      U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
      U+FEFF, U+FFFD;
  }
}

body {
  font-family:
    "Montserrat",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Helvetica",
    "Arial",
    sans-serif;
}

Specifications

Specification
Media Queries Level 5
# prefers-reduced-data

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
prefers-reduced-data media feature
Experimental
Chrome – No support
Chrome 85 (Release date: 2020-08-25)
footnote , disabled
disabled From version 85 users must explicitly set the #enable-experimental-web-platform-features preference to Enabled. To change preferences in Chrome, visit chrome://flags.
footnote See bug 40118365
Edge – No support
Edge 85 (Release date: 2020-08-27)
footnote , disabled
disabled From version 85 users must explicitly set the #enable-experimental-web-platform-features preference to Enabled. To change preferences in Edge, visit about:flags.
footnote See bug 40118365
Firefox – No support
Firefox
footnote No support
Opera – No support
Opera 71 (Release date: 2020-09-15)
footnote , disabled
disabled From version 71 users must explicitly set the #enable-experimental-web-platform-features preference to Enabled. To change preferences in Opera, visit opera://flags.
footnote See bug 40118365
Safari – No support
Safari
footnote No support
Chrome Android – No support
Chrome Android 85 (Release date: 2020-08-25)
footnote , disabled
disabled From version 85 users must explicitly set the #enable-experimental-web-platform-features preference to Enabled. To change preferences in Chrome Android, visit chrome://flags.
footnote See bug 40118365
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – No support
Opera Android
footnote No support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote
footnote See bug 40118365
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.
User must explicitly enable this feature.

See also