Skip to content

Load event also fires on back button when previous page is still available #643

@helpimnotdrowning

Description

@helpimnotdrowning

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-boosted.

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?

2025-10-29.11-40-54.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions