Page is Unloaded

The Page is Unloaded event is triggered when a user leaves the current page — whether by closing it, navigating to a different page, or switching views within the app. This event is especially useful for performing cleanup actions, saving unsaved data, resetting states, or logging user activity before the page is dismissed. It ensures that any final actions are executed right before the page is removed from view.

Example:

Suppose your app includes a form on the Profile Settings page. You want to automatically save any temporary data or log the user’s exit activity when they leave the page. To do this you will use the Page is Unloaded event. As a result, whenever the user navigates away from the Profile Settings page — either by switching to another page or closing the app — your specified action will be executed automatically.

Last updated