Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm using SPD to edit an HTML file that's in SharePoint (in a subfolder of SiteAssets). Later, I return to the file in SPD to find that the following content has been added to the file (where "www.contoso.com" is my site's address):

<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head>
<!--[if gte mso 9]><xml>
<mso:CustomDocumentProperties>
<mso:_dlc_DocId msdt:dt="string">2TTW66AP5EP2-4-16</mso:_dlc_DocId>
<mso:_dlc_DocIdItemGuid msdt:dt="string">99e55405-8ec0-4d75-950a-a29493433d06</mso:_dlc_DocIdItemGuid>
<mso:_dlc_DocIdUrl msdt:dt="string">http://www.contoso.com/_layouts/DocIdRedir.aspx?ID=2TTW66AP5EP2-4-16, 2TTW66AP5EP2-4-16</mso:_dlc_DocIdUrl>
</mso:CustomDocumentProperties>
</xml><![endif]-->
</head>

How can I prevent this content from being added to my file? Alternatively, is this a good thing? Do I want this content for some reason?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

When you edit a file in SPD, the file automatically becomes "Unghosted". This (rather confusing) term means that the file has been "Customized".

The effects of this depends on what type of file you are editing. For example, if you are editing a Page Layout, the code that's added will literally break the page, since the content added will not be wrapped inside a (of the master page).
In your case, it may not cause any problems.

Here are some good references on Ghosted VS Unghosted and how to reghost files in case of need.

Ghosted VS Unghosted: http://www.a2zdotnet.com/View.aspx?Id=87#.T1a77YewauI
Disabling ghosting: http://blogs.msdn.com/b/steve_fox/archive/2010/03/08/ghosting-unghosting-in-sharepoint-2010.aspx
Reghosting (need to install a wsp with stsadm extensions): http://blog.falchionconsulting.com/index.php/2007/09/re-ghosting-pages/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.