Skip to content

Remove usage of the unload event #54793

Open
@radnor

Description

@radnor

The unload event is deprecated and should not be used. Instead, utilize the visibilitychange or pagehide events.

Additionally, usage of the unload event reflects negatively in Google Lighthouse's SEO scoring.

https://developer.mozilla.org/en-US/docs/Web/API/Window/unload_event

Usage:

window.addEventListener('unload', cleanup, { capture: false, once: true });

Metadata

Metadata

Assignees

Labels

Priority:1Work that is critical for the release, but we could probably ship withoutarea-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing onetriaged

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions