#1
  1. The Basketball Star
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2001
    Location
    H-Town
    Posts
    550
    Rep Power
    14

    JavaScript browser sniff to redirect correctly


    I'm using a lot of "new" technology I guess on my website, which some browsers won't be able to recognize, soI need to run a browser sniff on my page so I can make the correct redirections. Here's basically what's going on. If the person is running IE 5.0 or higher, they can stay at the current page. If they are running NS6 or higher or Mozilla 1.2 or higher (the other two browsers I've tested it on) then they need to go to the alternative page, which looks exactly the same, but the coding is different cuz those browsers are stupid and difficult and don't want to make things easy for me. Finally if they don't meet either of those requirements, they need to be redirected to a text-only page that has all the general information, but isn't nicely designed and doesn't have any graphics.

    I also need to make the restriction on having a screen resolution of 1024x768 or higher. If lower, they need to be redirected to the text-only page.

    I don't know if this is too much to ask, but I really could use the help on this. Thanks!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    http://www.google.com/search?hl=en&i...er+sniffing%22
    - about 2.200 results.

    but if you code correct HTML / JS, Mozilla and NN6 will work. You better go this way because: what do you do if JS is disabled?
  4. #3
  5. The Basketball Star
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2001
    Location
    H-Town
    Posts
    550
    Rep Power
    14
    Well I've fixed the problem that required an alternative so all I need is a redirection if it's not one of those three browsers (IE 5.0 & NS6 or Mozilla or higher) and the screen resolution is below 1024x768.

    If JavaScript is disabled the won't be able to view the site correctly and there's a link on the bottom of every page that says that if you can't view the site correctly go to the text-only page.

    Thanks for the link.

IMN logo majestic logo threadwatch logo seochat tools logo