Quantcast
Viewing all articles
Browse latest Browse all 6517

Commented Task: Implement check for _spPageContextInfo [10126]

In SharePoint 2010, we have a variable called _spPageContextInfo that provides current context information. We can use this to obtain the current site, user, etc.

See John Liu's post:
http://johnliu.net/blog/2012/2/3/sharepoint-javascript-current-page-context-info.html

Checking for this variable will improve performance in SharePoint 2010, as it can eliminate a call to get the current site, and possibly other values.
Comments: In v2013.01ALPHA2, I created new SPServicesContext function to return the current context. If SharePoint 2010, I mine _spPageContextInfo, else we do it the old-fashioned way.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>