-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to detect Brave Browser #159
Comments
@jeynergil If you can capture the user agent string I can take a look. |
Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.152 Mobile Safari/537.36 |
i dont believe it will provide your brave due to the fact that edge and brave are both chromium browsers at their base level |
@jeynergil @dFilipkowski0131 based on that user agent string, I feel like that is definitely going to be the case. Feels like at some stage I think the browser developers are definitely ramping up their efforts to ensure we aren't using user agent strings! |
you can detect Brave this way (I tested) : |
You can also make a request to |
I started to make a PR for this, but got stuck on testing. I can't see a way with tape to mock |
@lancesnider Thanks for having a crack at a PR. I'm thinking that the best way to deal with the various "work arounds" required to detect browsers these days might be to add a separate file into the repo that includes the various hacks. Ideally, I'd like to keep the core functionality of this module to UA sniffing even though it's very unreliable these days. The alternative is to make the module detect all browsers by default (including the various hacks required to do so) and if people want to only use the UA sniffing they can only import that function and let dead code elimination strip out the unused code from this package. Just trying to think of the best way to structure it. Certainly having to execute async functions to detect a browser does change the game a little. |
Yeah, that all makes sense. Regarding the async, I didn't end up needing it. |
This is an awesome package.
Can it detect Brave Browser?
Using Brave, it returned this:
Thanks!
The text was updated successfully, but these errors were encountered: