3 ms·
Good. User-agent strings are a mess. Here is an example of a user-agent string. Can you tell what browser this is? Mozilla/5.0 (Windows; U; Windows NT 5.1; en-
by surround 7y ago
Good. User-agent strings are a mess. Here is an example of a user-agent string. Can you tell what browser this is?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13
How did they get so confusing? See: History of the browser user-agent string
https://webaim.org/blog/user-agent-string-history/ https://webaim.org/blog/user-agent-string-history/
Also, last year, Vivaldi switched to using a user-agent string identical to Chrome’s because websites refused to work for Vivaldi, but worked fine with a spoofed user-agent string.
https://vivaldi.com/blog/user-agent-changes/ https://vivaldi.com/blog/user-agent-changes/
- rplnt 7y agoIf companies like Google wouldn't abuse the user agent string to block functionality, serve ads, force their users to specific browser then companies like Google wouldn't have to use fake UA strings and then maybe companies like Google wouldn't have to drop their support.
- Craighead 7y agoYou should read the link to know the history of why what you said is wrong.
- dirtydroog 7y agoAnything to do with HTTP is a mess!
- jsjddbbwj 7y agoChrome 0.2 on Windows XP?
- collinmanderson 7y agoAs a web developer, I have very little trouble reading the User-Agent header. User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.1.2222.33 Safari/537.36 Sec-CH-UA: "Chrome"; v="74" Sec-CH-UA-Full-Version: "74.0.3424.124" Sec-CH-UA-Platform: "macOS" Sec-CH-UA-Arch: "ARM64" Sec-CH-Mobile: ?0 Isn't moving this information to a separate Sec-CH-UA headers going to make things _more_ messy? Especially if it's in _addition_ to the frozen User-Agent header? Aren't we still going to have the issue with needing to fake even the new Sec-CH-UA header? If we're going to freeze the User-Agent header, that's fine, but don't just move the unfrozen info to a separate header. Now you have 2 problems. Aren't we just making the problem worse?
- freehunter 7y agoVery little trouble? That user agent says it’s Mozilla, then says it’s Windows 10, then says it’s Apple, then says it’s Gecko, then says it’s Chrome, then even though it said it was Windows it goes on to say it’s Safari. The individual headers, on the other hand, tell you EXACTLY what the system and browser is.
- jsjddbbwj 7y agoThat's because you have no experience. Any web developer worth their salt knows what the string means and what browser it represents. Which is okay because user agents are to be parsed by computers and rarely developers, not end users.
- freehunter 7y agoWell that's quite rude, you don't know me at all so you have no idea how much experience I have. And it's also quite contradictory... if the string is only rarely to be parsed by developers, why would "any web developer worth their salt" bother memorizing every browser's user agent? Experienced web developers don't have anything better to do than memorize a useless string they rarely have to work with?