I'm trying to get the latest browser version number programatically with javascript. For example, when someone is visiting my site with Chrome, I want to know "Which is the latest version of Chrome available?"
I tried using navigator.userAgent
but the returned information only contains the current browser version which the visitor has installed.
Is there any way to get the information about the latest browser version? I don't want to use static variables for it.
You can use this API:
https://developers.whatismybrowser.com/static/main/api-docs/v2/swagger-ui/index.html
The API is free, easy to set up and provides the latest version numbers for the most popular web browsers.
I hope that works for you! Keep rocking
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.