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 instead of ">” expressions, replace “>” with the characters “76”, and replace “>>” operators with division by a power of two.

See also  Comparing different methods of testing your Infrastructure-as-Code

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist