decorative banner

Adding browser-switch scripts


    You can add a browser-switch script to the head section of your Web page that detects the Web browser loading the page and automatically redirects viewers to an alternate page based on their browser. For example, you can use this feature to have version 3.0 browsers switch to another page if the current page contains features (such as actions, animations, and cascading style sheets) that can only be interpreted by version 4.0 browsers and later.

    Note: The browser-switch script is ignored by version 2.0 browsers and Microsoft Internet Explorer 3.01 for Mac OS.

    Since an older browser can't read the browser-switch script, you should make sure that the page you're placing the script on is built for the oldest of browsers and assumes no redirect is possible. You can also use the browser-switch script to separate Netscape from Internet Explorer browsers based on browser-specific markup support.

To add a browser-switch script:

  1. Drag the Browser Switch icon from the Smart set Smart set button in the Objects palette to the body of the page. GoLive automatically moves it to the head section and opens the head section pane.
  2. In the Browser Switch Inspector, select the browsers that support the features on your page:
    • Select Auto to have GoLive determine browser compatibility. For example, if your page contains features that can only be interpreted by version 4.0 browsers and later, GoLive configures the script to reroute requests from version 3.0 browsers.
    • If the same browsers are supported in Windows and Mac OS, deselect Auto, choose All from the Platform menu, and select the supported browsers.
    • If different browsers are supported in Windows and Mac OS, choose Windows from the Platform menu and select the supported browsers for Windows. Then choose Mac OS from the Platform menu, and select the supported browsers for Mac OS.

    Note: In the Browser Switch Inspector, you can select the infinity symbol for Netscape or Explorer to indicate that the supported browser versions are those later than version 5.0.

  3. Specify the URL to an alternate page in the Alternate Link text box. (See Specifying the destination URL for a link.)
  4. When you have finished, try viewing your page with an incompatible browser and check whether the request is correctly rerouted.