Skip to main content

Function: defaultAnchorStorageKey()

defaultAnchorStorageKey(pathname?): string

Defined in: src/world/anchors/AnchorsOptions.ts:14

Builds the default storage key for a page.

Scoped to the path because anchors are stored per origin: two apps served from one host would otherwise restore each other's anchors, which reads as mysterious content appearing on first run rather than as a shared store.

Parameters

pathname?

string

Page path; omit when there is no document.

Returns

string

The storage key to default to.