htmx
htmx copied to clipboard
`hx-boost` doesn't load script files
When using hx-boost, pages that bring in additional scripts and resources don't get scripts loaded. To be specific, pages that add additional scripts to <head> don't get additional scripts added to <head>
Although I could simply add every script to head globally, I'd rather not as that takes extra time to load
This is literally what hx-boost is for. hx-boost makes your anchor links into AJAX requests, which specifically DO NOT reload the scripts in <head>.
Just make a normal anchor link, or send down an HX-Refresh response header to force those scripts to reload from boosted links.
https://htmx.org/docs/#boosting
https://v1.htmx.org/reference/#response_headers