Sec-CH-Prefers-Color-Scheme
Request headers
Tells the server whether the user prefers a light or dark colour scheme.
| On the wire | Sec-CH-Prefers-Color-Scheme: … |
|---|---|
| Category | Request headers |
Headers the browser attaches when it sends to the server.
How to read this
- The first digit of a status code carries the meaning: 4 means the request, 5 means the server.
- 404 means "not there"; 403 means "there, but not for you". Swapping them makes debugging slower.
- Header names are case-insensitive — Content-Type and content-type are the same header.
- Caching and CORS problems usually come down to one header line, visible in the browser’s network tab.
Frequently asked questions
Q. What does HTTP Sec-CH-Prefers-Color-Scheme mean?
Tells the server whether the user prefers a light or dark colour scheme.
Q. What does Sec-CH-Prefers-Color-Scheme look like on the wire?
It travels as Sec-CH-Prefers-Color-Scheme: …
Q. Where does Sec-CH-Prefers-Color-Scheme appear?
In request headers.
Q. What group does Sec-CH-Prefers-Color-Scheme belong to?
The request headers group; the rest of that group is listed further down.