Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

check chrome version from console

Is there a way to detect Google Chrome's version from the console. I know I can parse the user agent string - but I prefer a more concise way.

Here is what I currently have:

var uaStr = navigator.userAgent.toLowerCase(); var index = uaStr.indexOf('chrome/'); uaStr.substring(index +7,index+11); 

I would like to know if there's a better way - something like chrome.version()

Thanks.

like image 708
Rubinsh Avatar asked Nov 16 '15 12:11

Rubinsh


People also ask

How do I see Chrome version from console?

Use chrome://version Command Enter chrome://version in the address bar and hit enter. You will see the Chrome version and other details like 64 or 32 bit build.

How do I get Chrome version on Linux?

Use wget to download the Chrome package. To get it the latest stable version, run this command: Type wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb and press the Enter key.

How do I know if I have the current version of Chrome?

Open Google Play on your Android device. Tap the hamburger icon on the top-left. Tap My apps & games. Tap Updates and see if Google Chrome is listed here.


1 Answers

In Chrome DevTools Console execute the following statement:

 > navigator.appVersion.match(/.*Chrome\/([0-9\.]+)/)[1] 

And you will get the version number as a string

 > "51.0.2704.103" 
like image 85
Gilad Foyer Avatar answered Oct 04 '22 07:10

Gilad Foyer