What are ghosted and unghosted pages?
Ghosted Pages
Ghosted pages are those pages whose content does not reside in the content database, they reside on the actual file system disk and a reference to the file is maintained. Hence it can be said that these pages act as a template. From a technical standpoint, ghosted pages are those rows in the docs table which have null values for the Content column and a non-null value for the SetupPath column which points to a file on the file system itself. The referenced file essentially serves as a template and content source.
Unghosted Pages
When site pages are customized, the page is unghosted and their content is then stored in the content database. These pages are specific to a particular web application. If in the ONET.XML file a page has been marked as an unghosted page then instead of saving the reference to the file the page itself is stored in the content database. The SharePoint SafeMode parser ensures unghosted pages are not allowed to run server side code. This security feature prevents a user from injecting code into page which may maliciously, or unintentionally, bring down a server, snoop data, etc.
The site admin though can make sure that the pages are not unghosted from the central admin. Under the "Configure SharePoint Designer Settings", if the option "Enable Detaching Pages from the Site Definition" is unchecked, then the pages cannot be unghosted. The user can only open up the file in SharePoint Designer in the normal mode, it will not be opened in the advanced mode, which actually unghosts the file.
Comments
Post a Comment