Skip to content

consider using beforeunload event sparsely #8595

Open
@akosyakov

Description

Using unload and beforeunload events is not recommended: https://developers.google.com/web/updates/2018/07/page-lifecycle-api#the-beforeunload-event
In order to detect last page interaction one can use pagehide and visibilitychange events instead: https://developers.google.com/web/updates/2018/07/page-lifecycle-api#advice-hidden
beforeunload event should be installed only when there is unsaved changes and removed when there are not

Metadata

Assignees

No one assigned

    Labels

    coreissues related to the core of the applicationenhancementissues that are enhancements to current functionality - nice to haves

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions