Leave SiteEdit off your live site

SiteEdit is SDL Tridion’s inline editing functionality. Once enabled, your editors can browse the staging site and edit pages there and then, without having to find the item they want through the Content Manager interface.

SiteEdit works by surrounding the editable elements on a page with HTML span tags.

<span id="_SE_CP" _SE_C="tcm:113-40744" 
_SE_CP="tcm:113-40744" _SE_CT="tcm:113-162-32" 
_SE_CPt="generalfull">
{COMPONENT APPEARS HERE}
</span>

On a page containing many components and/or fields, the HTML can be littered with these span tags and, while it’s not going to add a huge amount to the page size, every byte counts.

On top of that there is always the small chance that the unexpected span tags will interfere with the page design, particularly if you have CSS properties like this:

span {
display: block;
color: red;
}

Finally, it’s just bad form to make your visitors download code that supports your Content Management System – something that should be invisible, let alone contributing to your bandwidth bill.

To restrict the inclusion of the SiteEdit span tags to your staging site, all you need do is put one line of code into your Page Template that detects the Publish Target at render time.

That one line of code will keep your HTML clean and make your users even happier. Do it.

Categories: Tridion, Website performance

Comments

Comments are closed.