The client makes an initial request to the server:
The server responds, telling the client via
Accept-CH
that it accepts
Sec-CH-Prefers-Reduced-Motion
. In this example
Critical-CH
is also used, indicating that
Sec-CH-Prefers-Reduced-Motion
is considered a critical client hint.
Note:
We've also specified
Sec-CH-Prefers-Reduced-Motion
in the
Vary
header to indicate that responses should be separately cached based on the value of this header (even if the URL stays the same).
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-Motion
that it has a user preference for reduced-motion animations:
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.