How to Handle Older Browsers With Javascript

Older web browsers are not equipped to handle standard Javascript. The 1 and 2 versions will likely display your full Javascript code instead of performing the Javascript you want. If you don't want your code displayed for anyone still using an older browser, there is a simple step you can take to get around it.

Instructions

    • 1

      Find out how many web browsers do not handle Javascript. This will help determine if protecting your code from older browsers is needed. Check online resources to find out how many older browsers are still being used.

    • 2

      Start your code with the opening tag:

    • 3

      Open the Javascript comment with "". This will make older browsers treat the Javascript code as an HTML comment. This is the key in getting around older browsers' code limitations.

    • 4

      Close your Javascript tag with .

Tips & Warnings

  • An older browser that doesn't recognize the

Related Searches:

Comments

You May Also Like

Related Ads

Featured