News for hackers. Stuff that matters.
Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by nradov on Sunday July 12, 2026 @07:38PM (#48886001)
The HTTP User-Agent header was a mistake from the beginning. There is no legitimate need for the server to know what software the client is (or claims to be) running.
Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by parasense on Sunday July 12, 2026 @07:58PM (#48886168)
It certainly wasn't a mistake in the beginning, but it's certainly a mistake now.
Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by thaumasiotes on Sunday July 12, 2026 @11:40PM (#48887612)
It was a mistake in the beginning too. If you want to serve different content to different people, you use two different URLs. There's never a valid case for doing it while hiding it from the user.
Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by sroussey on Sunday July 12, 2026 @11:58PM (#48887731)
No, that misses the whole point of content negotiation (for language, et al). In the age of search engines though, different urls are often perferable.
Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by thaumasiotes on Monday July 13, 2026 @06:45AM (#48890677)
> No, that misses the whole point of content negotiation (for language, et al).

There's been some pushing for browsers to automatically decide what language you want to view a webpage in, and that is even more insane than the User-Agent header is. The correct solution for content that exists in multiple languages is to make each language available at its own URL. Just like I already said. Why in the world would you want to lose the option to select the language you want?

Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by esrauch on Sunday July 12, 2026 @07:55PM (#48886143)
I feel like this is with 2026 view where browsers are so mutually compatible.

In the bad old days there were so many differences between html, css and js behaviors that if you wanted your site to be nice you had to change it for the browser. The way css padding worked wasn't even the same. Feature detection was rarely viable for any of this.

No user agent would probably have only entrenched IE6 dominance even more by blocking you from deliberately making a site that works at all on other browsers (including IE7 for that matter)

Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by nradov on Sunday July 12, 2026 @08:12PM (#48886269)
I'm aware of that history and the User-Agent header was a mistake even back then. It took the pressure off of browser vendors and gave them an excuse to not fix their bugs.
Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by tyami94 on Sunday July 12, 2026 @09:27PM (#48886758)
road to hell is paved with good intentions. one could argue it would've made browser vendors fix their bugs, but with the side-effect that any behavior that isn't bug-compatible with IE becomes a bug. this would've ironically entrenched IE permanently.
Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by smaudet on Sunday July 12, 2026 @10:15PM (#48887051)
The mistake was not claiming features rather browser client versions...

JS devs were kinda able to patch around the nonsense because they were able to feature-detect - part of the reason this stuck around was because no legitimate user or dev cared (or should care). But the header was mostly (useless) noise, and the people spoofing were dealing with the couple bad apples of the time.

Of course, defining features is easier said than done, and a standards body is a challenging environment to define these in...

I get why people are fingerprinting bots and others are working around it, but neither are "legitimate" applications - if your content is public, it's public, end of story. And working around these controls to sell botnet access to sites is equally illegitimate - nobody has a right to resell content they do not own...

Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by esrauch on Monday July 13, 2026 @04:20AM (#48889476)
I just can't see how it could make sense to define features when a ton of the the behavior wasn't even intentional but just tons of bugs. I recall debugging issues that only reproduced in "IE7 compatibility mode of IE8" which didn't reproduce in either IE7 or IE8. And that was already after the standards were taken at all seriously
Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by 14113 on Sunday July 12, 2026 @08:15PM (#48886292)
> I feel like this is with 2026 view where browsers are so mutually compatible.

I wish this was the case. Unfortunately, companies that work on non-Chromium browsers need to employ dedicated web compatibility teams to either a) help website users fix non-standard (i.e. Chrome only) HTML/CSS/JS, or b) replicate Chromium-like behaviour for specific (very popular) websites so that they work "correctly".

There's also the websites that deliberately block certain browsers which is what tools like "chrome-mask"[1] are built to solve.

[1] https://addons.mozilla.org/en-GB/firefox/addon/chrome-mask/

Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by saghm on Monday July 13, 2026 @12:56AM (#48888095)
And you can see how well that worked by how many user-agents are such a sane, terse description of the browser rather than a hodgepodge of random words that give the impression that they're trying to seem like every browser at once.
Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by esrauch on Friday July 17, 2026 @06:24AM (#48945530)
Sure that part is a specific problem which is that new browsers basically want to declare their hacks profile against people who have already written sites and won't update them.

In practice when you make your new set of hacks the string you can always evaluate whatever cruft in the useragent today, but next browser shows up.

It does make the user agents insane but I don't know if there's any obviously better system for the problem, even with hindsight

Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by pocksuppet on Monday July 13, 2026 @01:39PM (#48896109)
> browsers are so mutually compatible.

Not really, there's just only one browser (Chrome). Firefox has declined so low it's a rounding error, and all other browsers are Chrome forks.

Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by Ferret7446 on Sunday July 12, 2026 @11:05PM (#48887370)
There is actually/obviously. It lets you identify bugs in well meaning clients. e.g. you can identify if IE v1.2.3 isn't handling form submissions correctly. It lets you serve content that works for clients with known issues or limitations.
Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by 1vuio0pswjnm7 on Sunday July 12, 2026 @11:21PM (#48887483)
"The HTTP User-Agent header was a mistake form the beginning."

User-Agent spoofing was added to NCSA Mosaic in 1996. The public www was three years old and text-only clients were still in widespread use

https://raw.githubusercontent.com/alandipert/ncsa-mosaic/mas...

NCSA Mosaic is the early graphical browser that begat Netscape Navigator that begat Firefox. Later came Internet Explorer, Safari, Chrome and so on

What was the point of spoofing in 1996

Several years ago, Google indicated it was going to "deprecate" the user-agent header in Chrome

As a matter of practice, by default I do not send a user-agent header. I only send the minumum headers required. For me, that's almost always 1-2 for GET and 4 for POST

For the vast majority of websites I have accessed,^1 this header minimisation has zero effect on the success of the HTTP request

1. For example, I have used a database of sites submitted to HN as way to test if header minimisation affects HTTP request success

Generally I do not use a web browser to make HTTP requests. I perform text processing on the HTML, JSON or whatever is returned, using custom utilities. I store information in SQLite. I read this information as plain text, preferably 7-bit ASCII. I dislike UTF-8

Onlilne debates about "browser fingerprinting" always seem to focus on trying to "blend in", e.g., via "spoofing"

As such, because browser continue to get more bloated with "features", online commenters argue in favor of sending more and more data points to servers that can be used to create a fingerprint instead of reducing the amount of data sent

Because, according to their reasoning (or lack thereof), sending less data would "stand out"

True, but it's generally easier to "spoof" a client that sends less data than one that sends more. And the number of sites that require a user-agent header is still smaller than the number that don't

Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by Chu4eeno on Monday July 13, 2026 @09:13AM (#48892175)
I take it you either have a godly IP reputation, or you don't hit 90% of the current internet which is behind cloudflare, google, akamai, etc?

They're pretty brutal in blocking non-browsers, I tend to have to add a lot of useless headers.

Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by 1vuio0pswjnm7 on Monday July 13, 2026 @04:36PM (#48898471)
According to their /clientrep-lookup database the IP address I am using has no reputation

Blocking "non-browsers" and blocking IP addresses are two different things, so to speak

The first is based on dumb heuristics and (incorrect) assumptions about behavior based on what software someone is (mistakenly) presumed to be using

The second is based on past behaviour

I send the minimum HTTP headers

I only request what I want; I do not send requests for ads, tracking or telemetry

I accept text formats, e.g., HTML, JSON, etc.

No need for images, CSS, Javascript, etc.

Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by 1vuio0pswjnm7 on Tuesday July 14, 2026 @02:38PM (#48911257)
https://www.akamai.com/us-en/clientrep-lookup

IMO, there is a fundamental difference between (a) not using the data collection, surveillance and advertising-friendly software, i.e., popular graphical web browsers controlled by so-called "tech" companies that, surprise, said so-called "tech" companies and their business partners want people to use and (b) engaging in bad network behaviour, what some used to call poor "netiquette"

The heuristics used to allegedly identify bad behaviour, for example, sending the "wrong" value in a User-Agent header, are beyond stupid

But the false positive totals, "collateral damage", are apparently not large enough to matter

https://seclists.org/nanog/2025/May/246

Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by 1vuio0pswjnm7 on Monday July 13, 2026 @10:56AM (#48893708)
HN replies sometimes (often) include statements unsupported by evidence

For example, something like "90% of the current internet is behind Cloudflare, Google, Akamai, etc."

The www is only subset of the internet and "90% of the internet" does not use a CDN

In any event, even if "internet" means "www" there is no evidence to support this statement

https://www.netcraft.com/blog/may-2025-web-server-survey

Further, being "behind Cloudflare, Google, Akamai, etc." does not necessarily mean a User-Agent header is required

For example,

https://www.cloudflare.com does not require a UA header

https://example.com is "behind CF" and does not require a UA header

https://www.google.com does not require a UA header

https://developers.akamai.com does not require a UA header

And so on

Individual www users, unless doing mass scanning or the like, probably do not access 100% of the www's sites (according to Netcraft, most are inactive)

More likely, individuals access only a fraction of the active sites

It's unlikely that individuals access exactly the same list of websites^1

For me personally, the vast majority of sites that I access do not require a UA header

The sample set I use as evidence to support comments I make about this on HN is a list of all sites submitted to HN over a recent period.^2 Currently this is 12,641 sites

1. To have a meaningful discussion about UA header requirements, a sample set of sites must be agreed upon

2. Perhaps HN readers access these sites and possibly access some of the same sites. Of course it's also possible that there are HN commenters who do not actually access HN submissions and instead only read comment threads and submit replies

https://news.ycombinator.com does not require a UA header

Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by 1vuio0pswjnm7 on Monday July 13, 2026 @01:49PM (#48896225)
NB. Akamai does not require any specific value for the User-Agent header nor the presence of this header

For example, https://www.apple.com does not require a UA header

For example, http://www.slackware.com does not require a UA header. However, it does require Accept and Accept-Encoding headers

This site can also be accessed over HTTPS

Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by chrismorgan on Monday July 13, 2026 @12:15AM (#48887844)
When distributing software, it’s very useful to know which OS and which architecture the user is on in order to present them with the appropriate file.
Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by NetMageSCW on Monday July 13, 2026 @11:39AM (#48894371)
Or you could let the user decide since you have no idea what system they want to execute the software on, just what system they are using to browse your site.
Re:Since Chromium 148, Math.tanh is now fingerprintable to l... by chrismorgan on Monday July 13, 2026 @02:23PM (#48896676)
The overwhelming majority of the time (typically far higher than 99% of the time), if they hit a download button, they want it for their current platform.

And detecting their platform doesn’t stop you from presenting supplemental links for all platforms. In fact I’d say that’s completely normal.