Replies: 5 comments 1 reply
-
At first glance, it looks correct, I wonder what's happening there. |
Beta Was this translation helpful? Give feedback.
-
No, it is not in the request headers only in the response headers. HX-Refresh is a response header not a request header. By the way, I also (for another use case) tried to use: HX-Push-Url - with the same result. The only thing I can think of is that I am using it on a 302 and a 200 response. Could that be the issue? |
Beta Was this translation helpful? Give feedback.
-
I will work on a small reproduction in the next few days. |
Beta Was this translation helpful? Give feedback.
-
I am having the same issue. I was pretty sure I had it working a few months ago but seems to not. I am just importing the script tag I don't have a version pinned |
Beta Was this translation helpful? Give feedback.
-
@chanan I went back and found where I was doing this in another project. For redirects the server responds with a HX-Redirect: header and writes a 200 with no payload and that works For a just a refresh of current page its HX-Refresh: true with a 200 |
Beta Was this translation helpful? Give feedback.
-
Hi,
HX-Refresh is not working right for me, and I want to verify I am doing the correct thing.
I have a site with a nav bar that does not use HX-Boost, but instead has links like so:
<a id="nav-admin" class="nav-link {{#nav.admin}}active{{/nav.admin}}" hx-target="#content" hx-get="/reports/admin" hx-push-url="true" href="/reports/admin">Admin</a>
We are using Google Auth which returns an id token that is good for an hour.
When that hour expires I want to return them to / and do a full reload, which is what I thought HX-Refresh will do.
I am return HX-Refresh on the redirect to the home, but I am not getting a full reload:
Is this the correct usage or HX-Refresh? And if so, what am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions