Debian Codegraph @

www/src/content/reference/02-headers/06-HX-Boosted.md

raw symbols SCIP
1 ---
2 title: "HX-Boosted"
3 description: "Indicates a boosted navigation request"
4 ---
5
6 The `HX-Boosted` request header is set to `true` when the request comes from a boosted element via [`hx-boost`](/reference/attributes/hx-boost).
7
8 Boosted elements are regular links and forms that htmx intercepts to enhance.
9
10 ## Example
11
12 Detect boosted navigation.
13
14 ```python
15 if request.headers.get('HX-Boosted') == 'true':
16 # Boosted requests get the full layout
17 return render_template('page.html')
18 else:
19 # Regular htmx requests get a fragment
20 return render_template('fragment.html')
21 ```