Advanced htmx: hx-push-url and hx-replace-url
Push your ajax route to the url bar! Now you've got access to the back button again.
.. but what happens when you refresh?
Work with the browser history on any htmx request with hx-push-url and hx-replace-url.
PUSH it to the Browser history stack:
hx-get="/account/details" hx-push-url="true"
REPLACE the current browser history stack:
hx-get="/account/details" hx-replace-url="true"
.. but what happens when you refresh?
Work with the browser history on any htmx request with hx-push-url and hx-replace-url.
PUSH it to the Browser history stack:
hx-get="/account/details" hx-push-url="true"
REPLACE the current browser history stack:
hx-get="/account/details" hx-replace-url="true"