0

I am able to detect browser and its version using javascript. Check this link - Quirksmode.org

Is there a way to check whether this browser is the latest one. That is at the time of submitting this question i am having FireFox 15, Chrome 22 etc. In other words i need to check whether an update is available for browser or not.

millimoose
  • 39,073
  • 9
  • 82
  • 134
IrfanRaza
  • 3,030
  • 17
  • 64
  • 89
  • Why do you care if a browser update is available? Why is that any of your concern? – cdhowie Sep 28 '12 at 19:55
  • 4
    Don't. Use feature detection for what you need, let the browser vendors deal about updates. – millimoose Sep 28 '12 at 19:55
  • Not possible. How would **you** (as the developer) figure out the latest version of the browser? What about beta/dev/nightly builds? – Rob W Sep 28 '12 at 19:55
  • 1
    It's possible the OP wants to know so he can inform users to upgrade their browsers, such as if he's running a banking site, for example, where security is important. – Dai Sep 28 '12 at 19:55
  • 1
    Why do you think you need to detect the latest version of a browser? Did you notice the phrase at the top of that page that says **'Dont use this script?"** – Jeremy J Starcher Sep 28 '12 at 19:56
  • 1
    This could only be achieved by updating the latest version for each browser _manually_ in a DB (i.e once a week) and then compare it with the one detected. But I see no reason for doing such a thing – pankar Sep 28 '12 at 19:57
  • I think not, but a workaround is to compare (manual) catching the current versions of each browser. – PiLHA Sep 28 '12 at 19:57
  • Thanks all of you for your quick reply. No that's really my curiosity. One of client requested that the user must be notified if there is any latest version available for his/her browser. That's it. – IrfanRaza Sep 28 '12 at 19:58
  • 3
    @IrfanRaza Tell the client that such a request is rather silly. The browser is more than capable of informing the user about this on their own, and unless you want to get in the business of maintaining a list of latest browser versions for this client, I'd reject their request. – cdhowie Sep 28 '12 at 19:59

1 Answers1

3

This kind of thing is not really reasonable.

You'd have to have a way to always know the latest version of each browser, and since no standardized way exists, you'd have to resort to screen-scraping the browser vendors sites to find it. If the pages you are scraping change, you'd have to rewrite your scraper.

On top of that, you'd have to check that a later version of the browser is available on their OS. If they're on XP using IE8, they can't upgrade. If they're on old ubuntu using old chromium, they can't upgrade, etc..

The usual way to handle this is to officially support minimum versions of a few browsers, and possibly notify the user if they're not using a supported browser or version.

Dagg Nabbit
  • 75,346
  • 19
  • 113
  • 141