• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Hour 16. Creating Cross-Browser Scripts > Supporting Browsers with JavaScript

Supporting Browsers with JavaScript

If you're using features that are on the cutting edge and require a particular browser or version, there are several ways of using JavaScript to steer users in the right direction. The following sections explain three different methods.

Creating a Browser-Specific Page

The easiest solution—and the least polite—is to pick a browser version to support and kick everyone out who isn't using it. This is easy to do with a script in the header or body of the page. Listing 16.2 shows a simple example.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint