ServerContext
Defined in: core/src/visitorContext.ts:81
The visitor context a server derived for one request, for the browser to
adopt for the same page view (SparkletreeProvider’s serverContext).
The browser then sends exactly these values instead of reading its own, so its streams and the copy they cache are keyed the way the server read them. A value the server left out is left out by the browser too.
Properties
Section titled “Properties”deviceType?
Section titled “deviceType?”
optionaldeviceType?:DeviceType
Defined in: core/src/visitorContext.ts:82
language?
Section titled “language?”
optionallanguage?:string
Defined in: core/src/visitorContext.ts:87
The visitor’s preferred language tag, e.g. sv-SE.
optionalpins?:Record<string,string>
Defined in: core/src/visitorContext.ts:94
The variant the server read for, by pin key: the campaign id, or the surface id for a surface-addressed island. Pinned for the page view before any stream opens, so every island of that campaign or surface tells the same story the server rendered.
timeOfDay?
Section titled “timeOfDay?”
optionaltimeOfDay?:TimeOfDay
Defined in: core/src/visitorContext.ts:83
timezone?
Section titled “timezone?”
optionaltimezone?:string
Defined in: core/src/visitorContext.ts:85
IANA time zone, e.g. Europe/Stockholm.
viewId?
Section titled “viewId?”
optionalviewId?:string
Defined in: core/src/visitorContext.ts:101
Identifies the page view the server rendered. The provider scopes variant pins, slot memory and impressions to it, so a new server render (a navigation, a refresh) is a new page view in the browser too, and its pins are in place before any island’s stream opens.