Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hx-boost doesn't load script files #2484

Open
StandingPadAnimations opened this issue Apr 15, 2024 · 1 comment
Open

hx-boost doesn't load script files #2484

StandingPadAnimations opened this issue Apr 15, 2024 · 1 comment

Comments

@StandingPadAnimations
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants