Hacker News new | ask | show | jobs
by echochar 3811 days ago
"...user agent strings are a giant disaster of technical debt"

Amen.

I agree with the commenter below who suggests we use random strings instead. Unless there is some sort of published standard for what this header should contain and what each byte means, the contents may as well be random.

The "history" of "user-agents" (about 20 years) is not very long, assuming the web is going to last more than 20 years into the future. Taking a long view, we are still in the nascent phase.

2 comments

Are you suggesting unique randomized strings for every user?
That would be better, but not per user, per session. Currently I have surf(suckless.org) just pick a common one when I launch a tab (via tabbed): https://github.com/jakeogh/rndagent
per-HTTP request

Nothing ever guaranteed the user agent header would be consistent or present. Any re-use of a user-agent string adds bits of data that can be used for tracking.

While we're at it, we need some solution to tracking based on browser window size. I'm one of the few people I know who doesn't maximize everything, so I'm probably 100% uniquely trackable just by window size.
Window size detection is done with JavaScript. Block it.
It can apparently be done with CSS by a determined website.
Disable JS by default. I do, and it makes the web better. Surf/tabbed makes this easy to do per process.
If you do that, you are gong to break so many websites.
All the better to let them know they shouldn't be doing that.
That will be very popular with the users of your browser.
No, I mean, a tiny bit of css hacking will let you detect it.

Have a css media query for every possible height, and every possible width, that loads a 1px empty png.