Top ten web hosting - 41Chapter 13 .JavaScript Essentials Nonscriptable browsers do not
41Chapter 13 .JavaScript Essentials Nonscriptable browsers do not know about the tag. Therefore, their natural inclination is to render any lines they encounter after the opening JavaScript interpreters also know to ignore a line that begins with the HTML beginning comment sequence, but the interpreter needs a little help with the ending sequence. The close of the HTML comment starts with a JavaScript comment sequence (//). This tells JavaScript to ignore the line; but a nonscriptable browser sees the ending HTML symbols and begins rendering the page with the next HTML tag or other text in the document. An older browser doesn t know what the tag is, so the tag is ignored and rendering begins after that. Even with this subterfuge, not all browsers handle HTML comment tags gracefully. Some older America Online browsers display the script statements no matter what you do. Fortunately, these browsers are disappearing. If you design your pages for public access, include these HTML comment lines in all your