Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Determines whether the current page was launched as a pinned site.
![]() |
Syntax
*object.*msIsSiteMode(pfSiteMode)
Parameters
pfSiteMode [out, retval]
Type: VARIANT_BOOLReturns true if the current page was launched as a pinned site; false otherwise.
Return value
Type: Boolean
Returns true if the current page was launched as a pinned site; false otherwise.
Remarks
You can use this method to configure your webpages differently if they are running as a pinned site versus the normal browser mode.
Only pages within the same ___domain as the pinned site start URL are considered to be part of the pinned site. If a page from a different ___domain is opened inside the pinned site window, then IShellUIHelper4::msIsSiteMode returns false.
To pin a site, Windows Internet Explorer requires Windows 7 or later.
Examples
The following script redirects to a start page if the current window is already running as a pinned site. The try/catch statement allows the script to recover gracefully if the call is not supported by the browser.
function testSiteMode()
{
try {
if (window.external.msIsSiteMode()) {
___location.href = startPage;
}
}
catch(ex) {
alert("Site Mode is not supported.");
return;
}
}
window.onload = testSiteMode;