4 ms·
Or, make the information in the string useful. Like, maybe, just list the features the particular user-agent supports.
by jsprogrammer 11y ago
Or, make the information in the string useful. Like, maybe, just list the features the particular user-agent supports.
- joosters 11y agoUser-Agent: entire browser source code (uuencoded) ? Hmm... might be a bit big... how about, since the source code is publicly available, we could just put the browser name and version in there?
- drdaeman 11y agoNo, seriously. Can we just get all browser vendors cooperate and clean up the mess at the same time, so everyone wins? User-Agent: Chromium/47.0 (Windows 10) User-Agent: Firefox/43.0 (GNU/Linux; X11) User-Agent: Wget/1.15.4 (GNU/Linux) etc. Given that current UA strings are abysmal (and sent on every request), this would probably save a few kilobytes worth of headers (images, scripts, stylesheets), so would probably improve performance by some nanoseconds. They managed to do this with SHA-1 deprecation and a lot of other stuff. So they could just announce that "on February 1st, 2017 we all clean up the clusterfuck User-Agent headers are", bake in the timer and spread the word.
- lmm 11y agoWhat's the cost/benefit on that? Older sites would not update. Newer sites are using better forms of detection, except for the tiny number of sites that put engineering effort into supporting an insane long tail of old browsers. (SHA-1 deprecation only worked because certificates have to be renewed, so any site with working HTTPS is being actively maintained at some level)
- drdaeman 11y agoBenefit's obvious - getting rid of legacy cruft. It has to be done someday, or by 2030 we'll end up with few kilobyte-long UA strings. Cost: bajillion man-hours of CEOs, companies and committees trying to negotiate that they all do this at once, then about 10 minutes of developer time to actually code this into reality. Then some sites would be broken, but old stuff eventually rotting and dying is nothing new on the web. Unfortunately, no idea about the numbers, but I suppose it would be low. If someone has the actual statistics on how much sites become practically unusable without a legacy User-Agent header, that'd be great.
- lmm 11y ago> Benefit's obvious - getting rid of legacy cruft. It has to be done someday, or by 2030 we'll end up with few kilobyte-long UA strings. Which will cost how much by the standards of 2030? Particularly given HTTP/2 header compression.
- drdaeman 11y agoGetting lower response times isn't a main point here. Getting rid of the cruft is about sanity, not extra milliseconds. But I'm sure even by 2040 there still will be a lot of places with awful network connectivity, where every kilobyte would still matter.
- toast0 11y agoIf you're going to go from this "Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; BLU; WIN HD W510u) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537", to something useful, you should probably give the useful one a new name and drop u-a on the drop dead date... That way websites can test the new way with their audience in advance.
- Olap84 11y agoThe obvious solution is to deprecate User-Agent and have a new header. Browser-Version or something like that.