devxlogo

Hiding VBScript and JavaScript from Old Browsers

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, replace “>” with the characters “

devx-admin

Share the Post: