1

I have seen on this link Browser Detection in ReactJS how to detect different browsers. In the chrome it puts from version 1 to 71, I have version 83, so the variable does not detect it, is it false, does anyone have any updated version?

// Chrome 1 - 71
const isChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);

Thank you

Rub Play
  • 11
  • 1
  • I think 1-71 means it was tested on those versions, so far. Might still work on some more versions, with some luck, but might also be true for some Chrome-lookalikes. That's how I interpret the "1-71" code comment. Your question should probably go as a comment on the page you linked to. – Simon B. Oct 02 '20 at 13:07

1 Answers1

0

Maybe navigator.vendor.includes('Google') can be a useful trick to make the detection slightly more future proof. Requires testing though to not detect some unwanted browsers as Google-made.

Simon B.
  • 2,530
  • 24
  • 30