0

I'm trying to detect the type of browser a user is using so I can provide browser-specific instructions and extensions.

I would like something along the lines of "We think you're using Vivaldi. Follow these steps [to do something] in Vivaldi:" and because each browser (even chromium forks) have different settings, I would need different instructions per browser. I would also like to provide a link to different extensions (and ideally have the browser's logo too), although Firefox, Safari, and Chromium detection would suffice for that.

The browsers I would like to detect:

  • Chrome/ium

  • Vivaldi

  • Brave

  • Edge

  • Opera

  • FireFox

  • Safari

  • Gnome Web/Epiphany

I've seen detection algorithms like this one (https://stackoverflow.com/a/49448231/13649974), but not all browser advertise themselves in the user agent string.

Is there another way to do this?

If I can't, then I'll just detect chromium, firefox, and safari browsers.

  • This is never going to 100%, user-agent spoofing etc is pretty common these days. But as long as the user hasn't done things like this, then you could maybe try -> https://www.npmjs.com/package/detect-browser – Keith May 25 '23 at 18:45

0 Answers0