-
I have encountered an interesting problem. First, imagine following URL structure:
I configured all 3 pages to have Here are the simple steps to reprodure my problem:
Also the other way around:
Did I miss something in the documentation regarding hx-boost and relative URLs? Because if I remove the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
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.