in reply to Check for JavaScript Enabled

Other people's claims notwithstanding, there is an easy way to arrange it.

Send back a page that loads fine without JavaScript, and in it include the following:

<script> document.replace("http://my.company.com/alternate/url"); </script>
If they have JavaScript then they will be redirected. If not, then they won't.

Replies are listed 'Best First'.
Re: Re (tilly) 1: Check for JavaScript Enabled
by ignatz (Vicar) on Mar 04, 2002 at 16:36 UTC
    This works fine if a user follows the path that you intended, but they don't always do that... say they get the redirected URL from a friend. In order to insure that they did you would have to make sure that they only came from the page doing the redirecting.

    As stated before I would recommend to code a page that sets a cookie in JavaScript and then redirects them to another page. Anyone that sees the cookie has JavaScript enabled.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ()-()                                                      ()-()
     \"/    DON'T   BLAME   ME,   I  VOTED   FOR    PACO!       \"/
      `                                                          ` 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
      As mentioned above, give 'em output from a POST form. That way the destination page doesn't show up in the url. More advanced tricks can be done with Apache modules, or with cookies (bad use).

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.