question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide a Brave-specific User Agent for some sites

See original GitHub issue

Updated description

There should be a way to share a Brave-specific User Agent

We currently do this with our “site hacks”: https://github.com/brave/brave-core/blob/66ceaf3491778f7d9a62f215c8fb47b318c9b181/browser/net/brave_site_hacks_network_delegate_helper.cc#L62-L76

User Agent example format: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Brave Chrome/79.0.3945.117 Safari/537.36

This user agent is only shared with a few hard-coded sites, current list found here: https://github.com/brave/brave-core/blob/4621aa3f71758f3bd890f381f5774d91a0338b2e/common/shield_exceptions.cc#L17-L29

The scope for this issue would be to expand to our list to be dynamic (remove hard-coded entries) and match the list we provide for our supported publishers (already fetched on browser launch). https://laptop-updates.brave.com/promo/custom-headers

Original issue description

Carried over from https://github.com/brave/browser-laptop/issues/3693 Related https://github.com/brave/brave-browser/issues/4641

Brave should show some bravery of its own and own up to having its own User-Agent. I’m aware of and acknowledge this issue, but without identifying itself – brave will be counted in online statistics as just Chrome. Who knows? Maybe Brave will be more popular than Chrome one day, but website owners will not be prompted to sit up and take notice of Brave if they can’t identify any traffic from the browser and its users.

The original issue report is also misleading. Of course the User-Agent would be unique in that test if no one else yet have run the test. With more users, it’s uniqueness for tracking will be reduced over time.

We may need these initial overrides to start: UA overrides in Edge: edge://compat/useragent

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:17
  • Comments:35 (13 by maintainers)

github_iconTop GitHub Comments

14reactions
tomlowenthalcommented, Sep 10, 2018

As a general policy, we don’t want the user-agent string to make Brave users much more distinctive. Our general ballpark plan is to switch to a Brave UA when users on that platform will have an anonymity set of about a million.

9reactions
bbondycommented, May 13, 2019

Updated the title. We feel like we have a big enough user base now to go ahead with adding Brave to the end of the User-Agent.

So instead of: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36

We’d show: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36 Brave

Read more comments on GitHub >

github_iconTop Results From Across the Web

Brave User Agent String - UserAgent.me
Spam bots, download managers, and some browsers often send a fake UA string to announce themselves as a different client. This is known...
Read more >
User-Agent - HTTP - MDN Web Docs - Mozilla
The User-Agent request header is a characteristic string that lets servers and network peers identify the application, operating system, ...
Read more >
User-Agents For Web Scraping 101 - Bright Data
#1: Use a real user agent. If your user agent doesn't belong to a major browser, some websites will block its requests. Many...
Read more >
How to Change User-Agents in Chrome, Edge, Safari & Firefox
SEO professionals can change their browser's user-agent to identify issues with cloaking or audit websites on different devices.
Read more >
What are the latest user agents for popular web browsers?
However, some websites are really strict about which web browsers they allow to use them: some websites don't allow less common browsers to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found