Spec-Zone.ru › htmx

HX-Current-URL

Contains browser URL when request started

The HX-Current-URL request header contains the browser’s URL when the request was made.

Use it to understand page context or build relative URLs.

Syntax

The header is included as follows:

HX-Current-URL: https://example.com/products

Read the current URL from the request:

current_url = request.headers.get('HX-Current-URL')

Licensed under the Zero-Clause BSD License.
https://four.htmx.org/reference/headers/HX-Current-URL/

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API