CDATA is a sequence of characters from the document character set and may include character entities. User agents should interpret attribute values as follows: Replace character entities with characters,
Ignore line feeds,
Replace each carriage return or tab with a single space.
implicates more browsers will read the code better?
Rambo Tribble
3:09 pm on Mar 13, 2005 (gmt 0)
In the cold dose of reality department: There are more version 4 browsers out there than version 7.
webaster
3:18 pm on Mar 13, 2005 (gmt 0)
cdata better or comments?
webaster
3:35 pm on Mar 13, 2005 (gmt 0)
all I need to know is: is it perfectly safe to use CDATa in combination with HTML 4.01
Bernard Marx
4:09 pm on Mar 13, 2005 (gmt 0)
If you are using HTML 4, then I don't believe you need CDATA tags.
webaster
4:19 pm on Mar 13, 2005 (gmt 0)
but you can use CDATA safely in HTML 4.01 without producing parsing errors?
Bernard Marx
4:36 pm on Mar 13, 2005 (gmt 0)
Many people suggest hiding the markers from jaavascript by using single line comments, which are already doing. If you do that, I can't see a problem.
webaster
5:06 pm on Mar 13, 2005 (gmt 0)
have an example - without seeing the code too difficult to understand-
webaster
5:08 pm on Mar 13, 2005 (gmt 0)
So again using HTML 4.01 strict
This is ok too use? yes or no?
<script type="text/javascript"> //<![CDATA[
Your script ....
//]]> </script>
Bernard Marx
5:28 pm on Mar 13, 2005 (gmt 0)
I can't see why not, but as I suggested before, you could take this to the HTML forum for confirmation from someone who knows what they're talking about.