20.3.1. Hiding Scripts from Old Browsers
To prevent this, enclose the body of your script within an HTML comment, using the format shown in Example 20-4.
Example 20-4. A script hidden from old browsers
Browsers that do not understand the <script> and </script> tags simply ignore them. Thus, lines one and seven in Example 20-4 have no effect on these browsers. They'll ignore lines two through six as well, because the first four characters on line two begin an HTML comment and the last three characters on line six end that comment -- everything in between is ignored by the HTML parser.
Copyright © 2003 O'Reilly & Associates. All rights reserved.