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:

  • Current Culture
  • Current Language
  • Layouts URL
  • SharePoint web page URL
  • SharePoint site or subsite URL
  • UserId of the person logged into SharePoint
  • SharePoint site title

Here is a image list of all properties within _spPageContextInfo:

Leave a Reply

Your email address will not be published. Required fields are marked *