Edit this page

up.protocol X-Up-Mode
HTTP header

This request header contains the targeted layer's mode.

Server-side code is free to render different HTML for different modes. For example, you might prefer to not render a site navigation for overlays.

Example

The user updates a fragment main within a drawer overlay. Unpoly automatically includes the following request headers:

X-Up-Mode: drawer
X-Up-Target: main

The server chooses to render only the HTML required for the overlay. It responds with the following HTTP:

Vary: X-Up-Mode

<main>...</main>

Note

Request headers that influenced a response should be listed in a Vary response header. This tells Unpoly to partition its cache for that URL so that each request header value gets a separate cache entries.