Is it possible to distinguish Google Chrome from the open source Chromium browser using Javascript? The navigator.userAgent
property seems to be identical in both browsers.
You may not want to just check for Chromium because Google Chrome's PDF plugin can also be used in Chromium (by simply copying the .dll
file). In fact, I'm using it right now.
The best way is to check for the Chrome PDF plugin, using window.navigator.plugins
:
var pdf = false;
for (i in window.navigator.plugins) {
if (window.navigator.plugins[i].name === "Chrome PDF Viewer") {
pdf = true;
}
}
If you want to use the filename
instead of the name
, it's "pdf.dll"
(on Windows machines).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With