This post gives you a brief overview of the spPageContextInfo object properties and how it can help you while developing SharePoint 2013 apps.
Please keep in mind that this is based on the Technical Preview…
If you create your own app in SharePoint 2013, you can make use of the _spPageContextInfo object that is provided when your app is loaded.
//Get the relative URL for the current SPWeb var urlWeb = _spPageContextInfo.webServerRelativeUrl;
The following screenshot show you the properties and their values for the spPageContextInfo object in my app:
hope it helps!
PS: The object already existed in SharePoint 2010: