Debian Codegraph @

www/src/content/reference/02-headers/03-HX-Current-URL.md

raw symbols SCIP
1 ---
2 title: "HX-Current-URL"
3 description: "Contains the URL of the browser when the request was made"
4 ---
5
6 The `HX-Current-URL` request header contains the browser's URL when the request was made.
7
8 Use it to understand page context or build relative URLs.
9
10 ## Syntax
11
12 The header is included as follows:
13
14 ```http
15 HX-Current-URL: https://example.com/products
16 ```
17
18 ## Usage
19
20 Read the current URL from the request:
21
22 ```python
23 current_url = request.headers.get('HX-Current-URL')
24 ```