Thursday, November 22, 2012

Difference between ghosted and unghosted and what does it mean anyway?

This question is often asked by our SharePoint students.  To keep it short and sweet, ghosted means not customized and unghosted means customized. 
I'm sure everyone knows by now that SharePoint stores web pages like .aspx and other items in a few different places. 
  • The 12 Hive
  • The Content Database
  • IIS (in a virtual directory)
    • Some content in the 12 Hive
    • Some content nested under the InetPub folder
Well, let's say that there is a web page or other type of document that SharePoint uses that is stored in the 12 hive.  Like the default.aspx for example.  When it is first create during the install and placed in the 12 hive, it is considered to be ghosted.  An odd word for some that basically means that when the page needs to used it will be read from the folder somewhere in the 12 hive.  When your SharePoint site is created several entries are made in the Content Database (in SQL Server).  These entries tell SharePoint what Pages, List, Libraries, etc are associated with your SharePoint site.  But even though there is an entry in the database showing that your site uses the default.aspx page, it doesn't mean that the default.aspx page is stored in the database.  If you change the default.aspx (using SharePoint Designer for instance), you have customized the page and your version of the page will now be stored in the content database that stores the entries for that specific site.  The customized version of the default.aspx page is now considered unghosted for that specific site.
In other words, Ghosted pages become unghosted pages once a file has been modified.  There are several good reasons for this and there is more to the story. 

No comments:

Post a Comment

SharePoint - Cannot convert a primitive value to the expected type 'Edm.Double'. See the inner exception for more details If y...

Ad