bigskysoftware / htmx

</> htmx - high power tools for HTML
https://htmx.org
Other
37.83k stars 1.28k forks source link

`hx-boost` doesn't load script files #2484

Open StandingPadAnimations opened 5 months ago

StandingPadAnimations commented 5 months ago

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

defenestrator commented 5 months ago

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