Freigeben über


SharePoint Terms: Ghosted, Unghosted and Reghosted

The terms Ghosted, Unghosted and now Reghosted are very difficult to keep straight, and you'll find that even members of the SharePoint product team confuse them from time to time.

Ghosted means that the Site Definition pages have Not been Customized (Ghosted == Un-Customized) and the pages in your Site Definitions run directly from the file system (cached of course). You can check this out by going to a page like the default.aspx page in the STS Site Definition and typing "Hello" in the body somewhere. Run IIISRESET to clear the cache, and you'll see that "Hello" shows up immediately on all sites that were created using that Site Definition.

Unghosted means that the site has been Customized (Unghosted == Customized).  When you customize a v2 site in Frontpage or a v3 site in SharePoint Designer, or you add custom fields to a Doc Library, or you customize a site in the UI and then save it as a Template - upload it into a Template Gallery - and then create sites using that template; then the changes that you made are stored in the database as a diff and that is referred to as Unghosted (Note that all Unghosted sites are based on a Site Definition).

A request for a Customized (Un-Ghosted) page returns a response which is a combination of data from both the file system and the database. In v2 this was a performance hit, and you wanted to avoid having a large number of sites that were Un-Ghosted. In v3 - caching etc. has been improved, and you are encouraged to use SharePoint Designer to do as much customization as you want.

When we talk about Reghosting, such as using the "Reset to Site Definition" option in Site Settings, or the Reghost switch in STSADM when running a Gradual Upgrade, or using C# code for Reghosting (Blog 11 in the Upgrade series);  then the Diff in the database is nulled out (the customizations are deleted) and the Response once again is just the Site Definition page that runs out of the file system (Reghosting == Changing from Customized to Un-Customized).

Comments