#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    51
    Rep Power
    4

    Detect if visitor has older browser (IE8 ; FF3.6)


    is there a way to check if a visitor has an older browser version like IE8, FF3.6 or even older.
  2. #2
  3. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,066
    Rep Power
    1990
    Yes, there's lots of different ways.

    What language are you using that you want to detect this with?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    51
    Rep Power
    4
    Well, I'm mainly using PHP, so it would be nice to use PHP
  6. #4
  7. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,066
    Rep Power
    1990
    Best way to check this is using the $_SERVER ["HTTP_USER_AGENT"] value (I've got that from memory, so it could be different). If you look at that, you can find out what browser and version most people are running.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    51
    Rep Power
    4
    okay, I'll check it out. If I got any problems you'll hear :P
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    51
    Rep Power
    4
    Thanks,

    I figured it out, after googling your advice I came across get_browser() and that was exactly what i needed.
  12. #7
  13. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,066
    Rep Power
    1990
    Very nice. I hadn't heard of that functin before so that's a good one to remember now.
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    91
    Rep Power
    0
    where you want to add it?in ur own website or in forum?
  16. #9
  17. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,122
    Rep Power
    4258
    Originally Posted by Zobator
    is there a way to check if a visitor has an older browser version like IE8, FF3.6 or even older.
    While those are not the most recent versions of those two browsers they are still quite recent enough that they should be supported. For one thing, WinXP users can not upgrade to IE9+.

    Any function, including get_browser(), that relies on the "User Agent" HTTP request header is inherently unreliable to one degree or another. I urge you to use it with caution.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo