HX-Boosted
Indicates boosted navigation request
The HX-Boosted request header is set to true when the request comes from a boosted element via hx-boost.
Boosted elements are regular links and forms that htmx intercepts to enhance.
Example
Detect boosted navigation.
if request.headers.get('HX-Boosted') == 'true':
# Boosted requests get the full layout
return render_template('page.html')
else:
# Regular htmx requests get a fragment
return render_template('fragment.html') See Also
Licensed under the Zero-Clause BSD License.
https://four.htmx.org/reference/headers/HX-Boosted/