[dev] [surf] User-Agent string.

From: Marvin Vek <laen_AT_onedot.nl>
Date: Tue, 18 May 2010 17:56:00 +0200

Hey all,

thought i'd throw up something i've been twisting my head around.

The following resources describe what the User-Agent string should be:
        - RFC2616, sections 14.43, 3.8
        - https://developer.mozilla.org/en/User_Agent_Strings_Reference
        - http://www.useragentstring.com/
        - http://webaim.org/blog/user-agent-string-history/
        
As shown in the last URL (and the one before that), way to many browsers
abuse/violate the User-Agent string. Sure, every browser creator wants
people to be able to view every site, but this can be done in a better
way in my honest opinion.

The User-Agent string, as far as i understand, should be created out of
the following:
       
        Browser/Version (Platform; Security; OS-or-CPU; Locale)
        
Attached to that, additional components can be added:
       
        Engine/Version [( .. )]
        
As you can see on useragentstring.com Uzbl entry
(http://useragentstring.com/pages/uzbl/) they use the Browser name
correctly -most of the time-. Their Webkit version is wrong though,
and Surf has it correctly here. Same _could_ be said for Midori, but
they went for full compatability too.

What the entry for Surf should look like (again, if i understand the
RFC correctly), for example (OS/CPU derived from uname -sm):
       
        Surf/0.3 (X11; U; Linux x86_64; en-US) AppleWebKit/531.2+
        
Now, this will probably give problems with for example Google. But
since we're using the GTK version of Apple's webkit, we could add a
'Safari' compatibility component, and still have the User-Agent string
compatible with RFC2616:
       
        Surf/0.3 (X11; U; Linux x86_64; en-US) AppleWebKit/531.2+ Compatible (Safari)
        
With this User-Agent string, http://useragentstring.com/ detects it
correctly, even though it doesn't know Surf yet as it's not in their
database yet, but Gmail which looks for Mozilla, MSIE or Safari will
function properly.

Would love to hear what you think about it, and especially if this
would be subject for implementation in the surf sources directly.

Love!

-- 
Marvin Vek
-
printk ("Kicking board.
");
        linux-2.6.6/drivers/net/lp486e.c
Received on Tue May 18 2010 - 15:56:00 UTC

This archive was generated by hypermail 2.2.0 : Tue May 18 2010 - 16:00:03 UTC