hx-pod cover image

hx-pod

Htmx headers: Season 3 Recap

Jun 13, 2024
11:10

"We've done them all now"

All headers grouped

===========> REQUEST HEADERS

======> Flags

*HX-Boosted - was it a boosted link

*HX-Request - is it an htmx request

*HX-History-Restore-Request - is it a back button restore request

======> Auto-sent variables

*HX-Current-URL - current url page is at

*HX-Target - id of target if has id

*HX-Trigger-Name - which element triggered it by name

*HX-Trigger - which element triggered it

======> User Variables

*HX-Prompt - user is asked to provide prompt, this is what they typed


============> RESPONSE HEADERS

======> Browser & history commands

*HX-Location - hx-boost reload to page

*HX-Redirect - regular redirect

*HX-Refresh - refresh page

*HX-Push-Url - push url to top bar

*HX-Replace-Url - replace url in top bar

======> override attributes

*HX-Reswap - sets hx-swap value

*HX-Retarget - set hx-target value

*HX-Reselect - set hx-select value

======> Trigger events

*HX-Trigger - trigger an event on client immediately

*HX-Trigger-After-Swap - trigger an event after swapping in html

*HX-Trigger-After-Settle - trigger an event next lifecycle

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode