Skip to content

Should last activation timestamp be reset after navigation? #6588

Closed
@rakina

Description

Currently each Window has a last activation timestamp that never gets reset afterwards, except when the user activation is consumed (but that sets the timestamp to negative infinity, so sticky activation isn't affected). This means once any user activation happened, sticky activation will be true forever for that Window. If a user navigates away from a document and it gets stored in the back-forward cache and it later gets restored when the user navigates back to the document, the sticky activation stays true, so sticky activation-gated APIs can still run even if the activation was done before the navigation.

I'm not sure how bad this is, since we also have transient activation which is less affected due to expiry. The only usage of sticky activation in the HTML spec is in prompt to unload, which can be annoying I guess (clicking an iframe once means it can always send the beforeunload dialog on future navigations where we reuse the document?).

If it sounds OK, maybe we can just leave a note in the spec to make people more aware of this. If it sounds bad, maybe we can reset the last activation timestamp in unloading document cleanup steps.

cc @mustaqahmed @domenic

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions