Dreamweaver

Apply the Check Browser behavior

Note: This behavior is deprecated as of Dreamweaver 9. To access it, you must select the ~Deprecated menu item from the Actions menu of the Behaviors panel.

Use the Check Browser behavior to send visitors to different pages depending on their browser brands and versions. For example, you may want to send visitors using Netscape Navigator 4.0 to a different page than visitors using Internet Explorer 4.0.

It’s useful to attach this behavior to the <body> tag of a page that is compatible with practically any browser (and that does not use any other JavaScript); this way, visitors who come to the page with JavaScript turned off will still see something.

Another option is to attach this behavior to a null link (such as <a href="javascript:;">) and have the action determine the link’s destination based on the visitor’s browser brand and version.

  1. Select an object and choose ~Deprecated > Check Browser from the Actions menu of the Behaviors panel.
  2. Determine how you want to separate your visitors: by browser brand, by browser version, or both.
  3. Specify a version of Netscape Navigator.
  4. In the adjacent pop‑up menus, select destination options (Go To URL, Go To Alt URL, or Stay On This Page.) Here, you specify what to do if the browser is the Netscape Navigator version you specified or later and what to do otherwise.
  5. Specify a version of Internet Explorer and select destination options as you did in step 4.
  6. Select an option from the Other Browsers menu to specify what to do if the browser is neither Netscape Navigator nor Internet Explorer.

    Stay On This Page is the best option for browsers other than Netscape Navigator and Internet Explorer because most do not support JavaScript—and if they cannot read this behavior, they will stay on the page anyway.

  7. Enter the paths and filenames of the URL and the alternate URL in the boxes at the bottom of the dialog box. If you enter a remote URL, you must enter the http:// prefix in addition to the www address.
  8. Click OK and verify that the default event is correct. If not, select another event or change the target browser in the Show Events For submenu.