Non HX form submit (POST) are pushing URL into history preventing Form resubmission (htmx4)
Author: nikomirandaCreated Sep 10, 2026Updated Sep 11, 2026
I'm unsure if this is intended behavior or a bug. When HTMX is loaded on the page and I submit a standard form (method=POST) (without any HTMX attributes), refreshing the browser issues a GET request instead of resubmitting the POST request.
No PRG pattern (Post/Redirect/Get) is used.
In this case the form is submitted by JavaScript calling form.submit();
This can be fixed by adding
But as I said, the request is not performed by HTMX.
Source: bigskysoftware/htmx