Sec-CH-Prefers-Reduced-Transparency header

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.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The HTTP Sec-CH-Prefers-Reduced-Transparency request header is a user agent client hint that indicates the user agent's preference for reduced transparency.

If a server signals to a client via the Accept-CH header that it accepts Sec-CH-Prefers-Reduced-Transparency, the client can then respond with this header to indicate the user's preference for reduced transparency. The server can send the client appropriately adapted content — for example, CSS or images — to reduce the transparency of the content.

This header is modeled on the prefers-reduced-transparency media query.

Header type Request header, Client hint
Forbidden request header Yes (Sec- prefix)

Syntax

http
Sec-CH-Prefers-Reduced-Transparency: <preference>

Directives

<preference>

The user agent's preference for reduced transparency. This is often taken from the underlying operating system's setting. The value of this directive can be either no-preference or reduce.

Examples

Using Sec-CH-Prefers-Reduced-Transparency

The client makes an initial request to the server:

http
GET / HTTP/1.1
Host: example.com

The server responds, telling the client via Accept-CH that it accepts Sec-CH-Prefers-Reduced-Transparency. In this example Critical-CH is also used, indicating that Sec-CH-Prefers-Reduced-Transparency is considered a critical client hint.

http
HTTP/1.1 200 OK
Content-Type: text/html
Accept-CH: Sec-CH-Prefers-Reduced-Transparency
Vary: Sec-CH-Prefers-Reduced-Transparency
Critical-CH: Sec-CH-Prefers-Reduced-Transparency

Note: We've also specified Sec-CH-Prefers-Reduced-Transparency in the Vary header, to indicate to the browser that the served content will differ based on this header value — even if the URL stays the same — so the browser shouldn't just use an existing cached response and instead should cache this response separately. Each header listed in the Critical-CH header should also be present in the Accept-CH and Vary headers.

The client automatically retries the request (due to Critical-CH being specified above), telling the server via Sec-CH-Prefers-Reduced-Transparency that it has a user preference for reduced transparency:

http
GET / HTTP/1.1
Host: example.com
Sec-CH-Prefers-Reduced-Transparency: "reduce"

The client will include the header in subsequent requests in the current session unless the Accept-CH changes in responses to indicate that it is no longer supported by the server.

Specifications

Specification
User Preference Media Features Client Hints Headers
# sec-ch-prefers-reduced-transparency

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
Sec-CH-Prefers-Reduced-Transparency request header
Experimental
Chrome – Full support
Chrome 119 (Release date: 2023-10-31)
footnote Full support
Edge – Full support
Edge 119 (Release date: 2023-11-02)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 105 (Release date: 2023-11-14)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 119 (Release date: 2023-10-31)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 79 (Release date: 2023-12-06)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 119 (Release date: 2023-10-31)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

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

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.

See also