2

I'm building a small application to determine if your browser is current. I've found ways in PHP and javascript to get the user agent but i'm looking for some sort of API or service to get a response if your browser is the newest version.

asked Jul 21, 2012 at 22:03
6
  • I don't think you can actually do it. Commented Jul 21, 2012 at 22:07
  • 4
    I think you'd have to maintain the of latest browser versions manually. Commented Jul 21, 2012 at 22:31
  • 1
    I agree, manualy keeping info about the latest browsers versions and then comparing it to the user browser. Although creating such version repository and keeping it up to date may not be an easy task. Commented Jul 21, 2012 at 23:25
  • 3
    I would recommend that you look for browser features rather than to look at browser versions. This way your app runs with fallbacks in mind. You can use modernizr to help with that. Commented Jul 22, 2012 at 0:52
  • You could try using something like WURFL but I strongly suggest that you consider @skizeey's comment. It's much easier once you get the hang of it. Commented Jul 22, 2012 at 1:45

1 Answer 1

2

You could keep an APC (or file or whatever) cache of the latest browser versions updated via a weekly or daily cron job which scrapes the latest version numbers from the various websites. Then you could create a PHP script which utilizes that cache and compares it to a useragent to return whether or not the browser is current.

Having said that, the far more useful and sustainable approach is to determine which features you need and then use modernizr, which is literally one of the most useful JS libraries you can use to ensure compatibility. If you check out the download page, you can see which features you can detect using the script and thus you can tailor your website appropriately.

answered Jul 22, 2012 at 2:43
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.