Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Web
Expertise: Beginner
Nov 17, 1998



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Hiding VBScript and JavaScript from Old Browsers

Web page "graceful degradation" means making new capabilities invisible to older browsers that don't support them. Many authors hide VBScript or JavaScript code inside an HTML comment so that older browsers will not display the code in the middle of the Web page. However, some older browsers such as Lynx and Mosaic recognize the greater-than symbol (>) as an end of comment rather than the full end of comment string ("-->"). For anyone using these browsers, scripts using a ">" sign will cause the rest of the script after the ">" sign to display onscreen. To get around this, use "<" expressions instead of ">" expressions, replace ">" with the characters "\076", and replace ">>" operators with division by a power of two.
Erik Goetze
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date