

History of the browser user-agent string - bhaisaab
http://webaim.org/blog/user-agent-string-history/

======
pornel
And now we have Chromium-based Opera which can't call itself Opera and has to
use "OPR/16" instead, and pretends to be Chrome, which pretends to be Safari,
which pretends to be KHTML, which pretends to be Gecko, which pretends to be
Netscape.

On a related note W3C+Mozilla are trying to document use-cases for UA
sniffing: [https://etherpad.mozilla.org/uadetection-
usecases](https://etherpad.mozilla.org/uadetection-usecases)

~~~
sneak
I think it's lunacy to send do-not-track... with a user-agent alongside.

The user-agent header is an artifact of history, and should be abolished. I
can see no use case for it aside from standards-avoidance.

~~~
eropple
_> I can see no use case for it aside from standards-avoidance._

That's true, but one's platonic idea of the browser does take a backseat to
reality.

------
patrickmay
My user agent is "Drakma/1.3.0 (SBCL 1.1.5; Darwin; 12.2.0;
[http://weitz.de/drakma/)"](http://weitz.de/drakma/\)"). I like to keep
webmasters on their toes.

~~~
slashdotaccount
The ad companies and the NSA can identify you easier than usually.

~~~
jakub_g
I pretended to use WinRAR (long time ago to make fun on some boards), until
I've encountered
[https://panopticlick.eff.org/](https://panopticlick.eff.org/)

------
gnur
The real question is, is this still needed in the modern web? I have never
used the user agent to serve different content. I do expect that some sites
still use the user agent for detection of mobile browsers but that is also
deprecated for people with common sense..

~~~
streptomycin
It's still needed in many cases.

For instance, I wrote an IndexedDB-heavy web app. It doesn't work in browsers
that don't support IndexedDB. So I do feature detection and if IndexedDB is
not supported, I show an error message telling the user that if they want to
run the app, they have to use a more modern browser like Firefox, Chrome or
IE10.

...except on iDevices, where it is literally impossible to install any browser
that supports IndexedDB, despite the fact that it is possible to install
something called "Google Chrome" that is not really Google Chrome. So I do
user agent detection to display a different message to those users, so as to
not give them false hope and confusion.

~~~
Touche
You can use a polyfill that falls back to WebSQL (Supported on iOS):
[http://nparashuram.com/IndexedDBShim/](http://nparashuram.com/IndexedDBShim/)

~~~
streptomycin
I tried that and couldn't get it to work. Seems I'm not the only one with
problems
[https://github.com/axemclion/IndexedDBShim/issues](https://github.com/axemclion/IndexedDBShim/issues)

Admittedly I could invest more time to try to get it working, but iOS
represents a relatively small fraction of my users and even a working shim
could have problems (IIRC there are serious bugs with WebSQL in iOS 7, not
sure if they've been fixed; also, I don't know what this shim approach would
do to performance in an IndexedDB-heavy app).

------
philbarr
A great explanation that also made me laugh. I've never really thought of the
browser vendors trying to impersonate each other before; sort of, "competing"
for content. I always thought they just did what they liked and we all had to
hack around it.

~~~
renekooi
And they've all been hacking around our hacks!

------
ozh
All this was meant to fund Senior JAVA Dev jobs like this one:
[http://thedailywtf.com/Articles/The-Enterprise-User-
Agent.as...](http://thedailywtf.com/Articles/The-Enterprise-User-Agent.aspx)

~~~
kippetlong
Why do you capitalize Java like that? It's not an acronym or an abbreviation.
It's just a word - named after the type of coffee from the Indonesian island
of the same name.

------
tankenmate
Actually this history has one minor mistake (there may be more); Microsoft
didn't make their own web browser, well at least not initially, they licensed
their code from Spyglass.

------
pilif
_> And Internet Explorer supported frames, and yet was not Mozilla, and so was
not given frames._

I don't think that is correct. IE 2 didn't support frames. IE 3 did, but 2
didn't. I remember waiting for IE3 to get more market share so that I could
safely use frames.

I can't tell you what feature made them fake the user agent, but it wasn't
frame support.

Yeah. Those were the days :-)

------
ronancremin
The author reaches a trite conclusion uninformed by facts. The user agent
string is used by at least 90+% of the Alexa 100 to improve user experience.

There is a silent evidence problem here. Successful use of the user agent
string improves the user experience but goes unnoticed; failures are very
apparent.

From the article:

"user agent string was a complete mess, and near useless"

vs.

[https://etherpad.mozilla.org/uadetection-
usecases](https://etherpad.mozilla.org/uadetection-usecases)

His conclusion is a bit like saying "I don't see why I need ABS in this car
because I've never skidded since I got it."

------
iLoch
Sounds like we could really use a "User-Agent-Features" header or something
similar. Or we just say screw it and make a new standard for the User-Agent
header, then users can run in compatibility mode when needed.

------
Cthulhu_
I haven't had to deal with user agents in a while, thankfully. Except today;
the client wants the user to be presented the mobile site we built, or the old
desktop site, depending on user agent. I'm not going to parse no user agent
strings though - there's an open source library / database called WURFL [1]
that can do all those things. Hopefully.

[1] [http://wurfl.sourceforge.net/](http://wurfl.sourceforge.net/)

------
Spoom
The pseudo-Biblical writing style reminds me of The Book of Mozilla[1],
perhaps the coolest browser easter egg in existence, which, sadly, Chrome
decided not to implement.

1\.
[http://en.wikipedia.org/wiki/The_Book_of_Mozilla](http://en.wikipedia.org/wiki/The_Book_of_Mozilla)

------
toblender
Wow this is awesome, it answers so many questions.

I'm actually surprised that Mozilla didn't sue the other browser for using its
name in their User-agent browser. This may have secured Mozilla's place as #1.

------
angersock
And then mobile happened, and everything was fucked forever.

:(

