bigskysoftware / bigskysoftware/_hyperscript
Load event also fires on back button when previous page is still available
- Dominant language
- JavaScript
- Stars
- 3.8k
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Description
I have a table that has a header that listens for a `load` event to fetch its contents using HTMX. The table is then full of links that are `hx-boost`ed.
When these links are clicked, they navigate to a new page. Now, when pressing the back button, the table is still visibly loaded/the page has been cached (on first load the table is blank), but the `load` event is refired and the table is unnecessarily re-fetched.
Is there a way to filter these out and only fetch the table on "true" loads?
https://github.com/user-attachments/assets/7554133d-4c8b-4ef4-b6a7-71529b703a5d
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.