Skip to content

hx-boost and relative URLs #1991

Answered by croxton
maiksch asked this question in Q&A
Discussion options

You must be logged in to vote

I think this is because htmx will use the literal value of the anchor href for the request, rather than the fully-resolved url of the anchor provided by the browser (what you see when you hover over the link). I did introduce fully-resolved hrefs for request URLs in this PR but that change was subsequently reverted for the reasons discussed in that thread.

If you are careful in constructing the urls in your boosted anchors so they are always root-relative or absolute, then you shouldn't encounter this problem.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by maiksch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants