Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

sp core library.session.pageid

John Nguyen edited this page Apr 22, 2021 · 2 revisions

Home > @microsoft/sp-core-library > Session > pageId

Session.pageId property

A unique identifier for the current page within the client-side application.

Signature:

static get pageId(): Guid;

Remarks

A unique identifier used to correlate logging and other diagnostic information. Whereas the Session.applicationId tracks the entire lifetime of the client-side application instance, the pageId tracks an individual "page" that is rendered.

For example, suppose that the application initially loads PageA, then the user does in-place navigation (via the history.pushState() API) to PageB, then navigates back to PageA, and finally they close the browser tab. During this sequence, the applicationId will remain the same, however the pageId will change on each navigation. The 3 different pageId values are used by the diagnostics e.g. to track success/failure statistics for PageA independently of PageB.

The concept of a page is subjective and defined by the router for a particular application.

Clone this wiki locally