We’ve updated the NoibuJS script to capture and display page lifecycle events to give additional context to what’s happening on the browser during a user’s session. During the debugging process, a developer can assess what the page was doing during a session when an issue occurred, which may uncover the source of the issue and expedite its resolution.
Page events are displayed alongside user clicks and other actions in the session timeline. However, they do not display by default. To enable page events in a session timeline, open the Timeline Settings dropdown and check the Show Page Lifecycle Events box.
What are Page Lifecycle Events?
During the lifecycle of a web page, events are fired to indicate the state the page is in and track transitions between states. Page states are mutually exclusive–a browser cannot run a page in multiple states simultaneously. These states include, but are not limited to:
|Page is visible and has input focus.
|Page is visible but does not have input focus.
|Page is not visible and has not been frozen.
|Page is frozen. Browser has temporarily suspended execution of freezable tasks. Tasks that are already running can usually finish, but with limited capacity.
|Page is being unloaded and cleared from browser memory. New tasks cannot start, and in-progress tasks may be cancelled.
|Page has been unloaded by the browser. No tasks or events can run in this state.
Page events may indicate the state the page is in, or other details about the page’s lifecycle. Events include, but are not limited to:
|A DOM element has received focus.
|A DOM element has lost focus.
|The user has opened a new page, switched tabs, closed a tab, minimized the browser, closed the browser, or switched apps.
|The page has been frozen.
|The browser has resumed a frozen page.
|The user is opening a new page or navigating to a page through the back-forward cache.
|The user is navigating to a new page and the browser has added the current the page to the back-forward cache.
|Data is read from or written to local storage.
|The active history event has changed while while the user navigates the session history.
|Network connectivity has been restored.
|Network connectivity has been lost.
|Custom error message.
|The user has changed their preferred language.
|The fragment identifier of the URL–part of the URL that follows the # symbol–has changed.
|The associated document is about to be printed or previewed for print.
|The associated document has started printing, or the user has exited the print preview.
|Page has loaded.
|The window has been resized.
|The page state is about to change.
|The user has copied an object.
|The user has pasted an object.
How do Page Lifecycle Events Help with Debugging?
By examining page lifecycle events, a developer can better understand what the page was doing when an issue occurred. This information is valuable to the debugging process. Did the issue occur while the page was hidden? Did the user go offline or navigate to and from another tab before the issue occurred? Did the issue occur after the page froze and resumed multiple times? These insights are especially useful when diagnosing Phantom Errors, wherein the problem isn’t obvious through the video playback.