Forum Moderators: open

Message Too Old, No Replies

Google Chrome UA Covered in Apple Sauce

         

incrediBILL

11:56 pm on Sep 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Here's the browser user agent (UA) for the new Google Chrome browser:

"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"

Expect scrapers, spambots and botnets to use it in 5...4...3...2...

Pfui

2:24 am on Sep 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month


By the way, if anyone's blocking the following UA string by the app's first name --

"Rome Client (http://tinyurl.com/64t5n) Ver: 0.9"

-- make sure your block is case-sensitive or else you'll also kick Google's chRome.

Ocean10000

2:31 am on Sep 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well looks like they are riding on Safari's coat tails for browser identification.

What I would of loved to see it use a default User-Agent like the following instead.

"Chrome/0.2.149.27 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13"
But with an option to switch to the other User-Agent like how Opera allows. But I am guessing they wanted to start off with as many sites being able to determine basic browser capabilities off the bat based off old hacks like "(KHTML, like Gecko)" for really old sites that check for Gecko or KHTML, and included Safari for the newer sites.

It is the same complaint that is made about Internet Explorer hiding behind the Mozilla/4.0 compatible UA Stuff.

So what is everyone else's thoughts on the mater?

[edited by: Ocean10000 at 2:45 am (utc) on Sep. 3, 2008]

Pfui

2:38 am on Sep 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Given the Mac Safari-related ID, it's... ironic that Chrome for the Mac isn't available yet.

GaryK

3:17 am on Sep 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Safari for Windows uses the same weird UA Pfui. Owen, given how discombobulated the latest UAs from MSFT are I think the Chrome UA is acceptable. At least you can tell what OS it's for unlike Vista/Win2K8.

I agree with Bill about the countdown. ;)

VinDSL

6:02 pm on Sep 25, 2008 (gmt 0)

10+ Year Member



Personally, I don't have a problem with the Google Chrome UA. Kinda smart of them, actually!

I have an analysis module on my production site that tracks usage, and I just added Chrome to the mix.

Here's the Chrome UA I used for testing, via the 'User Agent Switcher' add-on in Firefox:

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

And, here's the PHP code I used for detection:

// Google Chrome - VinDSL (24-Sep-2008)
if( preg_match("/Chrome\/([0-9\.]{1,10})/i", $agent, $found ) ) $browser = "Google Chrome " . $found[ 1 ]

Seems to work well!

It was harder finding the official Google Chrome logo (which looks like a Pokéball) than detecting the browser itself.

If scrapers, crawlers, yada, yada, yada, start abusing the UA, it should be a simple matter to come up with a suitable regex and add them to a 'robots array' constructor!

[edited by: VinDSL at 6:30 pm (utc) on Sep. 25, 2008]