Creates a pinned site shortcut to the current webpage on the Windows Start menu.
This method has no parameters.
Method not invoked by user action.
An error occurred.
This method is not supported on Windows CE.
There are no standards that apply here.
The website is not pinned to the taskbar by default. Developers should encourage users to pin the website to the taskbar. Use the msIsSiteModeFirstRun method to determine when a website is installed, and remind users that the pinned site shortcut can be pinned to the taskbar.
When the webpage is launched as a pinned site, the shortcut icon ("favicon") of the website is used as the pinned site taskbar icon, as well as providing a color hint for the Back and Forward buttons in the pinned site browser window. To learn how to create high-resolution site icons, see Customizing the site icon.)
Optionally, meta elements can be used to customize the default behavior of the pinned site shortcut. The following elements are "install-time" values that can appear in the webpage when it is pinned. You can use these elements to customize the shortcut created by the msAddSiteMode method.
|application-name||The name of the shortcut. The value of |
|msapplication-tooltip||Optional text that is displayed as a tooltip when the mouse pointer hovers over the pinned site shortcut icon in the Windows Start menu.|
|msapplication-window||The initial size of the pinned site browser window. Content sub-elements provide size as number N, separated by a semicolon. |
The remainder of the elements are "run-time" values that might change over time. These elements can appear in the page that was installed, or in the page specified as the start URL for the pinned site.
|msapplication-task||You can define up to five tasks. Tasks appear in the Jump List of the pinned site in the Start menu or when it is pinned to taskbar, even when the application is not running. (You can also create Jump List items by calling msSiteModeAddJumpListItem.) Sub-elements are separated using semicolons. |
The following sub-element is optional:
|msapplication-task-separator||Place this element between tasks to place a visible line in the Jump List menu. The separators must be made unique by declaring |
The following HTML and script restarts the webpage as a pinned site when the user clicks a button.
The following meta elements customize the pinned site shortcut with a tooltip, start URL, initial window size, navigation button color, and a predefined task.
<meta name="application-name" content="Sample Site Mode Application"/> <meta name="msapplication-tooltip" content="Start the page in Site Mode"/> <meta name="msapplication-starturl" content="http://example.com/start.html"/> <meta name="msapplication-window" content="width=800;height=600"/> <meta name="msapplication-navbutton-color" content="red"/> <meta name="msapplication-task" content="name=Task1;action-uri=action1.html;icon-uri=images/icon1.ico"/>