Forum Moderators: open
These days there are very few browsers that don't understand the major client-side scripting languages and so it's not really that important, IMHO.
The one majoy exception to the above may be screen readers, although if memory serves me, I believe that they are intellegent enough to run the script or ignore it.
[edited by: BlobFisk at 5:55 pm (utc) on July 15, 2002]
But if you are going to hide then the closing comment must be commented out of the JavaScript (or whatever code type it is).
In JavaScript:
-->
should be changed to:
//-->
This gets JavaScript to ignore it. It is automatically ignored in most modern browsers anyway, but Netscape 4 and some others cause a JavaScript error because it thinks that '-->' is a command and tries to run it!
<STYLE type="text/css"><!--BODY{font-family:verdana,sans-serif}--></STYLE>
I suppose if you're still getting a large number of hits from second-generation browsers, you might need to.
Is anyone still getting hits from second-generation browsers?
I don't develop pages that support these folks (thank goodness!) but I do comment out my styles and scripts.
23 hits from Netscape 5.x
7 hits from Netscape 4.x
13 hits from Netscape 3.x
and a couple from Lynx and Opera...
strangely enough the hits came the same day as I joined this thread... so who was it anyone gonna own up to it ;)
Having said that my stats page looks better for it, not all MSIE now. :)