The HX-Replace-Url response header replaces the current browser history URL.
It does not create a new history entry.
If present, this header overrides any behavior defined with attributes.
Possible Values
- A URL to replace the current URL in the location bar. May be relative or absolute, as per
history.replaceState(), but must have the same origin as the current URL. false— prevents the browser’s current URL from being updated.
Example
HX-Replace-Url: /dashboard
Notes
- Response headers are not processed on 3xx response codes.
See also: hx-replace-url, HX-Push-Url