Friday, July 26, 2013

How customized master pages are managed in SharePoint 2010

Before you start customizing master pages, it’s helpful to understand how default master pages are stored and managed in SharePoint 2010 as this can affect your server’s performance and future administration. The default primary master page, v4.master, is part of a site definition that is stored on the server running SharePoint 2010 (the actual location is %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\GLOBAL\ directory). The site definition files are cached in memory on the server when first accessed at runtime, and the information in each file is pulled from the cache for each subsequent request. This allows the page to be reused across multiple sites and reduces unnecessary storage and retrieval of the page. All of this improves the performance and scalability of SharePoint. Learn more in the MSDN article, Site Definitions and Configurations.
When a master page is customized for the first time, a new edited copy of the page is stored in SharePoint’s content database instead of the server’s file system. This is why you see a message the first time you customize a master page in SharePoint Designer 2010, warning that you’re about to customize a page and it will no longer be based on the site definition. When you continue, you create the edited version in the content database which will be used for your sites pages instead of the original master page. This does not affect other SharePoint sites that are still using the original master page. If, at any time, you want to revert to the original master page and no longer use your customized master page, you can reset the master page to its site definition. This brings your site back to its original state and at the same time, creates a copy of your customized master page and places it in the Master Page Gallery in case you want to use it again.

No comments:

Post a Comment