SharePoint Online 365 _spPageContextInfo

In SharePoint Online 365, the _spPageContextInfo has more properties compared to SharePoint 2013. To view the SharePoint 2013 _spPageContextInfo, please go to blog SharePoint 2013 Javascript _spPageContextInfo.

When coding in SharePoint using JavaScript, then _spPageContextInfo code comes really in handy. _spPageContextInfo is a code that contains information about the current context or details about the SharePoint site. Some of the main data able to retrieve from _spPageContextInfo include:


Property SP 2010 SP 2013 SP Online 365 Example Value
webServerRelativeUrl x x x /Test Site
webAbsoluteUrl x x /Test Site
viewId x GUID
listId x x x GUID
listPermsMask x Object with properties
High & Low
listUrl x /Test Site/Pages
listTitle x Pages
listBaseTemplate x 850
x false
x false
cdnPrefix x static.sharepointonline
siteAbsoluteUrl x x
siteId x
x false
supportPoundStorePath x false
supportPoundStorePath x false
siteSubscriptionId x Guid
isSPO x true
farmLabel x AUS_3_Content
serverRequestPath x x /Site/Pages/MyForm.aspx
layoutsUrl x x _layouts/15
webId x Guid
webTitle x x TestSite
webTemplate x x 1
tenantAppVersion x x 0
isAppWeb x false
webLogoUrl x x _layouts/15/images/
webLanguage x x x 1033
currentLanguage x x x 1033
currentUICultureName x x en-US
currentCultureName x x en-US
env (environment) x prod
nid x 443
fid x 17518
serverTime x 2017-03-22T00:
serverTime x x 12$$16.0.6316.1203
x x true
openInClient x false
webUIVersion x x x 15
webPermMasks x x Object with properties
High & Low
pageListId x x x Guid
pageItemId x x x 1
pagePermsMask x Object with properties
High & Low
x x 1
userEmail x
userId x x x 10
userLoginName x
userDisplayName x (fullName)
isAnonymousGuestUser x false
isExternalGuestUser x false
systemUserKey x x i:0h.f|(sid)
alertsEnabled x x x true
siteServerRelativeUrl x x /
allowSilverlightPrompt x x x True
themeCacheToken x /TestSite::1:16.0.6316.1203
themedCssFolderUrl x null
themedImageFileNames x null
isSiteAdmin x true
ExpFeatures x (Array of Numbers)
eg. :[-1935701612,2018769739,
killSwitches x (look below)
(Many Guid with boolean value)
eg. {“6800C0DF-81BF-4446-9D60-2749595D1028”:true,
CorrelationId x Guid
x true
isNoScriptEnabled x true
groupId x null
groupHasHomepage x false
isWebWelcomePage x false
siteClassification x
hideSyncButtonOnODB x false
x false
sitePagesEnabled x true
DesignPackageId x Guid eg. 00000000-0000-0000-0000-000000000000
groupType x null
groupColor x #da3b01
siteColor x #da3b01
navigationInfo x null
MenuData x (look below)
Array of menu items.
eg. {“SettingsData”:[
“Text”:”Add a page”,
“Text”:”Add an app”,
“Url”:”/TestSite Site/_layouts/15/addanapp.aspx”}]}
RecycleBinItemCount x -1
PublishingFeatureOn x false
PreviewFeaturesEnabled x false
disableAppViews x false
disableFlows x false
serverRedirectedUrl x null
formDigestValue x (long string of numbers, date time)
maximumFileSize x 10240
formDigestTimeoutSeconds x 1800
canUserCreateMicrosoftForm x false
readOnlyState x null

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s