up.protocol X-Up-Location
HTTP header

The server may set this response header to set a custom browser location after a fragment update.

Without an X-Up-Location header Unpoly will set the browser location to the requested URL. After a redirect the URL of the last request is used. You only need to set X-Up-Location when you want to explicitly set a different URL.

When setting X-Up-Location it is recommended to also set X-Up-Method.

Example

X-Up-Location: /current-url
X-Up-Method: GET

Revealing an element

The URL may contain a #hash, e.g. X-Up-Location: /users#alice. Unpoly then reveals the element with that ID, like after following a link to /users#alice. A #hash in this header replaces any #hash of the requested URL.