Detect browser script?

Discussion in 'HTML & Website Design' started by zac439, Jul 19, 2007.

  1. #1
    I saw a script on a few places here and there that detects a certain browser, and then recommends a better one. My blog isn't so friendly for IE6 users (but IE7 is ok) and I would like to throw a warning out to anyone with IE6 to either get Firefox, or upgrade to IE7.

    Anyone know where I can get a script like this? I've scoured all the script directories and Google but came up with nothing :(
     
    zac439, Jul 19, 2007 IP
  2. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,126
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Corey Bryant, Jul 19, 2007 IP
  3. zac439

    zac439 Notable Member

    Messages:
    3,074
    Likes Received:
    214
    Best Answers:
    0
    Trophy Points:
    260
    #3
    Interesting. I'm looking for an all-in-one solution if there is one. I don't really have time to mess around with the code. Normally I would love to, but I'm too busy these days.

    Any kind of WP plugin perhaps?
     
    zac439, Jul 19, 2007 IP
  4. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,126
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #4
    So you are probably looking for a PHP solution? There is get_browser, but I use Windows and ASP / .NET. I thought you might have been looking for a JavaScript solution, sorry. But I am sure someone would have a PHP solution for you soon.
     
    Corey Bryant, Jul 19, 2007 IP
  5. Hostingtime

    Hostingtime Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I have a automatic language detect script. You could use the basics and transform it into a browser detect script. I use it to detect the langauge from a browser.

    Good luck.
     
    Hostingtime, Jul 19, 2007 IP
  6. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #6
    For .Net it is a simple request.browser and then responding to the value
     
    AstarothSolutions, Jul 20, 2007 IP
  7. zac439

    zac439 Notable Member

    Messages:
    3,074
    Likes Received:
    214
    Best Answers:
    0
    Trophy Points:
    260
    #7
    I guess I could do either javascript or PHP. I'm just looking for an already-made solution, not information on how I could do it.

    thanks everyone, I guess I'll keep looking.
     
    zac439, Jul 20, 2007 IP
  8. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Don't use a browser detection script. Browsers have the ability to not only mask their UA (User Agent) string, but some, including Opera, can actually identify themselves as other browsers (without revealing their true identity).

    Furthermore, rather than telling people to "get (what you think is) a 'better' browser" respect their choice (or their inability to use a different browser, as is often the case with kiosks and other public terminals such as library computers) and build your sites to support them, or at the very least, degrade gracefully in older browsers (even if it means sending them just the structure and content wihtout the presentation and behavior, though this is recommended only for Mac-IE, pre-5.01 versions of Internet Explorer for Windows, pre-7 versions of Opera and pre-7 versions of Netscape).
     
    Dan Schulz, Jul 20, 2007 IP
  9. zac439

    zac439 Notable Member

    Messages:
    3,074
    Likes Received:
    214
    Best Answers:
    0
    Trophy Points:
    260
    #9
    I have already explored the option of fixing the problem, and have hit a deadend. I am unable to find help either- so this is probably my only choice.

    I thought of this idea simply to help those who can't view my site well because of IE6. I wasn't recommending what I think is better, but what works for my blog (everything except IE6, in fact)

    I'm stressing out over the situation. I hit a dead end everywhere I go.
     
    zac439, Jul 20, 2007 IP
  10. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #10
    What site are you having problems with?
     
    Dan Schulz, Jul 20, 2007 IP
  11. zac439

    zac439 Notable Member

    Messages:
    3,074
    Likes Received:
    214
    Best Answers:
    0
    Trophy Points:
    260
    #11
    zac439, Jul 20, 2007 IP