Friday, November 19, 2004

SharePoint : Ghosted vs unghosted pages

The concept of ghosted pages is something that you have to understand when customizing SharePoint. All items in SharePoint are by default stored in the database, but some aspx pages are not stored in the SharePoint database but on the file system, e.g. default.aspx for each site and also the search.aspx page for SharePoint Portal Server. These pages are called ghosted pages. These pages are pulled from the cache at runtime and therefore it will increase the scalability from the system since all uncustomized pages are reused accross all of the sites and there is no unnecessary data storage or retrieval.

But these ghosted can become unghosted when they are modified with e.g. FrontPage. However FrontPage is not the only culprit, when you modify one of these pages through webfolders with notepad, then the page will also become unghosted. These unghosted pages are stored in the database. Normally if a page which is used in a site definition is changed, this change will apply to all sites created with this site definition,but if you're page is unghosted this will not happen. There is also a slight performance impact of about 10% between ghosted and unghosted pages because the files are being read from the database instead of the cached filesystem. You can check if a page has become unghosted with ghosthunter utility or by checking the vti_hasdefaultcontent field obtained through the Properties property of the SPFile object.

There have been a lot of postings about ghosted and unghosted page and the role of Frontpage in this issue, take a look at them, they will provide more detail about for example the difference in parsing, so check them out

  • What you don't know about FrontPage can hurt you?

  • Dustin Millers response to the previous article

  • Ghosted and unghosted pages Part 1 on BlueDogLimited

  • Don't kill the messenger ...
  • Web part page + DVWP != always unghosted : nice tip for using the dataview webpart and not unghosting your page
  • No comments: