bigskysoftware / bigskysoftware/htmx

Forward History Navigation does not Respect any Redirect

Open
#2,446 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
49.4k
Forks
1.7k
Avg merge
3d 22h
Merged PRs (30d)
30

Description

When navigating forward onto a url with the browser forward button, if the page is not cached and the browser request is met with a 3xx redirect status code, htmx will render the page but it won't update the url.

Steps to repro:
1. Have a form submit do an HX-Push-Url
2. Render some content with an hx-history="false". This prevents the htmx from caching this content
3. Click browser back to return to initial page
4. Click forward and have the server respond 303 location to the initial url
5. The URL bar is still on the second page

I have tried adding any number of hx-replace-url header combinations but the URL always remains on the second page with the content of the first page

Will provide reproduction on request

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.