Jump to content

CDATA


astralaaron

Recommended Posts

My understanding of the CDATA comments is that whatever is between them will be skipped by crawlers? so If i have a little program that i want on each page, but don't want the text within the div's to be crawled, does it make sense to document.write it out onto the page inbetween CDATA comments? thanks

Link to comment
Share on other sites

No. CDATA sections are ignored by parsers, not by (I'm assuming you mean "search engine...") crawlers.Also, they aren't really skipped... it's just that they're taken as a whole unparsable thingy. By the end of parsing, a CDATA is visible as an equivalent text node, but without entities, i.e.

<![CDATA[ 2 < 3 ]]>

is equivalent to writing

 2 < 3 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...