3 ms·
Too bad they don't show in the User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Would love to show the amo
by AdriaanvRossum 4y ago
Too bad they don't show in the User Agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)
Would love to show the amount of visitors in Simple Analytics dashboards. [1]
Does anybody know a way to detect the DuckDuckGo browser?
[1] https://www.simpleanalyics.com https://www.simpleanalyics.com
- AdriaanvRossum 4y agoThey seem to set something on `window.navigator._duckduckgoloader_` If you run `JSON.stringify(window.navigator)`, it only shows the _duckduckgoloader_ variable. Anybody knows why JSON.stringify behaves like that?
- wifu 4y agoJSON.stringify is outputting the "own, enumerable" properties. The default properties of window.navigator aren't enumerable and/or come through the prototype chain. The rules for JSON.stringify are actually pretty complicated: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- AdriaanvRossum 4y agoThanks for sharing!
- doitLP 4y agoBrave does something similar. It just looks like a generic version of chrome
- WallyFunk 4y agoIt didn't always have a generic Chrome UA, if you go here[0] it had 'Brave' somewhere in the string, which you could fix by turning on fingerprinting prevention. Glad they fixed that. I don't want people to know I use Brave, although I'm sure there's ways to detect Brave with JS. [0] https://duckduckgo.com/?q=what+is+my+useragent&ia=answer https://duckduckgo.com/?q=what+is+my+useragent&ia=answer
- AdriaanvRossum 4y agoYou can do `await navigator.brave.isBrave()` to detect Brave. [1] https://github.com/brave/brave-browser/issues/24478 https://github.com/brave/brave-browser/issues/24478
- WallyFunk 4y ago> Does anybody know a way to detect the DuckDuckGo browser? Only in the DDG iOS app the useragent adds a DuckDuckGo string appended to a generic Safari string. You can test here: https://duckduckgo.com/?q=what+is+my+useragent&ia=answer https://duckduckgo.com/?q=what+is+my+useragent&ia=answer