Closed xvello closed 2 years ago
After checking the open issues a second time, it looks like this might be a duplicate of https://github.com/bigskysoftware/htmx/issues/379. Hopefully the reproduction case will be helpful to get to the bottom of it?
Yes, this is a dup of #379 will comment over there.
Fix ready for next release:
https://github.com/bigskysoftware/htmx/commit/60a67179941b98132ac577abf1b42ea030231b65
Thank you so much @1cg, your work is very appreciated :bow:
Hello,
I am using
<body hx-boost="true">
for progressive enhancement of a server-side-rendered website. While it works great, I ran into an issue for a page that has progressive enhancement on a form. I defined JS functions in an inline script in the page, and use them asonclick
callbacks works great.To reduce the size of the pages, I moved these functions to a js file, linked via a
<script src="my.js"></script>
. While this works if you directly load the page, it fails to load if you start at the index page and navigate to it via boosted links. When it fails, reloading the page (bypassing the boost) makes it work. Moving thescript
element to the head didn't help either.file://
, so I ranpython3 -m http.server
to serve it easily.I would expect the external JS to be detected and imported when the page is swapped, using the browser's cache to avoid repeated downloads.