Jump to content

CDATA


astralaaron
 Share

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

  • Like 1
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...