LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 05-13-2012, 08:59 AM   #1
EliasAlucard
Member
 
Registered: Apr 2005
Distribution: Xubuntu 12.04 LTS amd64
Posts: 82

Rep: Reputation: 15
User Agent string


I'm currently working on a vBulletin plugin for postbit, so that the user agent string is identified and properly displayed in the postbit. That way, the browser and operating system is shown as two small icons. This plugin has been around for years, but the original author stopped working on it, so I'm updating it now with new icons and so on.

Anyway, Linux Mint shows up as Ubuntu when posting from Mint, and this is not the fault of the plugin, but because how Linux Mint is configured not to display its own UA string, which is problematic because the user agent string is about giving credit where it's due, and this gives us incorrect statistics of how common this and that distribution is on our websites/forums when the developers of said distribution (or browser) don't care enough about setting their own UA string and removing the UA string the OS/browser was forked from.

The following UA strings are used in Linux Mint 12:

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/11.10 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.10.229 Version/11.64

It's completely illogical that Chrome/Chromium still shows the Safari UA string in version 18. Aside from the fact that it still identifies as Ubuntu, it also identifies as Linux and not GNU/Linux. A few years ago, this may not have been a problem because pretty much everyone who was using "Linux" was using GNU/Linux, but now, when we have Android, we have Linux without GNU, and we also have Debian/kFreeBSD (which is basically GNU/BSD), Nexenta OS (which was GNU/OpenSolaris), Arch Hurd and GNU Hurd (both of which are GNU variants as opposed to GNU/Linux), I think it's time to distinguish between generic "Linux" and the many variants of GNU and Linux. Linux is and always has been strictly a kernel anyway; not a complete operating system. Moreover, many Android UA strings identify as "Linux" only, which also adds more to the confusion, because it implies that Android is GNU/Linux too since most of the actual GNU/Linux distributions identify their UA string as "Linux" only.

In any case, why are developers so ignorant of the user agent string in their projects? If anything, it gives recognition to their projects.

I would like to encourage debate upon this issue and encourage developers to stop neglecting the user agent string and set them as correctly as possible, such as, "Linux; Android" when it's Android (obviously, because Android doesn't use GNU), "GNU/Linux; Ubuntu" when it's Ubuntu, and Mint when it's Mint, and so on. And no Safari when it's Chromium, and no Chrome when it's Chromium, and no Safari/Chrome when it's Comodo Dragon / SRWare Iron and so on. Please, how difficult can it be?

Last edited by EliasAlucard; 05-13-2012 at 10:52 AM.
 
Old 05-13-2012, 10:08 AM   #2
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,065

Rep: Reputation: 315Reputation: 315Reputation: 315Reputation: 315
Hi there,

I can't help thinking that you give the User Agent string a meaning it doesn't deserve.

Basically, it should be a string that tells the server a bit about the HTTP client (aka browser). But fact is, for most browsers it can be set to arbitrary values by the user, it can be modified by proxies between server and client, and it can be changed or supplemented by certain libraries and other software components on the client side. Plus, it's an information not even required by the HTTP specification - that is, it could be missing entirely.

Years ago, some web services examined the User Agent to identify the client and try to circumvent known bugs of certain browsers. However, the proliferation of different browsers (including variants of the same "chassis") renders even that intention useless.

Considering all that, it's okay to look at the User Agent string in the server logs to identify requests that might originate from the same client. But other than that, it's not worth more than a fancy badge of one's favorite football club.

Almost the same applies to the HTTP Referrer, by the way.

[X] Doc CPU
 
Old 05-14-2012, 01:37 AM   #3
John VV
Guru
 
Registered: Aug 2005
Posts: 13,531

Rep: Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807Reputation: 1807
as above
today it is not an issue
IE5 and IE6 WERE the issue

the odd css use and lack of png with alpha support
And the Microsoft Visual Java VS. the official Sun JAVA

this required odd "hacks" for different browsers

Quote:

In any case, why are developers so ignorant of the user agent string in their projects? If anything, it gives recognition to their projects.
they are not

they don't give a bleep any more, and for the most part it is not needed .

Quote:
I would like to encourage debate upon this issue and encourage developers
if you want you can , but a lot of folk use "user agent switcher" in Firefox
I like to be a "google-bot " as seen in logs .

Last edited by John VV; 05-14-2012 at 01:38 AM.
 
Old 05-15-2012, 04:22 AM   #4
EliasAlucard
Member
 
Registered: Apr 2005
Distribution: Xubuntu 12.04 LTS amd64
Posts: 82

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Doc CPU View Post
Hi there,

I can't help thinking that you give the User Agent string a meaning it doesn't deserve.
That's not the case at all. The user agent string is important.

Quote:
Originally Posted by Doc CPU View Post
Basically, it should be a string that tells the server a bit about the HTTP client (aka browser). But fact is, for most browsers it can be set to arbitrary values by the user, it can be modified by proxies between server and client, and it can be changed or supplemented by certain libraries and other software components on the client side. Plus, it's an information not even required by the HTTP specification - that is, it could be missing entirely.
Yes, but most users don't actually tamper with the UA string, proxies and whatnot. Most people just run the browser as is, and most browsers (certainly the big ones) have their own UA strings.

Quote:
Originally Posted by John VV View Post
they are not

they don't give a bleep any more, and for the most part it is not needed .
It's needed for statistics. It's thanks to the UA string we know how much market share Windows, GNU/Linux, Firefox, Safari etc. have. Be that as it may, the statistics isn't 100% accurate because of the aforementioned issues in Doc's post, but

Quote:
Originally Posted by John VV View Post
if you want you can , but a lot of folk use "user agent switcher" in Firefox
Out of all Firefox users (we're talking millions of people here), how many do you think actually use the UA switcher? According to Mozilla, this extension has an average of 651,963 daily users. How many average Firefox users are there today? It's certainly in the millions, and if not billion, it's close to a billion.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] spoofing the user agent string through squid nass Slackware 4 11-07-2011 09:23 AM
scripts should use an informative user-agent string with contact information linuxbird Linux - Newbie 1 06-20-2010 05:01 PM
bash: all --user-agent for "wget --user-agent " frenchn00b Programming 1 07-07-2009 06:25 AM
LXer: Microsoft Buries $10,000 For People With IE8's User-Agent String LXer Syndicated Linux News 0 06-18-2009 01:10 PM
syntax error in string trim and wrong node routing agent in tcl script newbie06 Linux - General 0 02-23-2007 03:00 AM


All times are GMT -5. The time now is 08:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration