browser_detection issue with puffin browser
nsaillant
Status: New User - Welcome
Joined: 14 Feb 2014
Posts: 3
Reply Quote
Hi

I think I found an issue when comparing the results from bowser_detection with another mobile detection script.

Here are some examples of user agents lines being reported as desktop:
Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.35 Puffin/2.10990AP
Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.35 Puffin/3.10990IP

I think the puffin browser is only for phones or tablets so I think there is a issue here.

Also about this line:
Mozilla/5.0 (Linux; U; en-us; KFOT Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.12 Safari/535.19 Silk-Accelerated=true
it is being reported as a computer but the other script says tablet so I'm not sure what to think about this one.

Thanks!
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4128
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
Since it's far too time consuming to track the huge range of mobile useragents, I rely on user feedback for adding new ones.

Rather than rely on what another script tells you, which can be either right or wrong, I prefer that you know yourself what type of mobile device any particular useragent string is found on.

It's easy to update generic mobile detection by simply adding the browser name, like puffin, but tablets are not so easy, tablet is a very very loose category, at what point, for example, does a tablet become a phablet become a phone? 7" screen? 6" screen? 5"?

I'm always happy to update the list, but please provide the actual data: like, the puffin browser is found on device type x, and so on. In this case I'll look it up myself, but in general, I prefer that people requesting devices/ua strings added to mobile detection do the work themselves, keeping up with mobile device useragent strings takes too much time, they change constantly, and the types morph into each other.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4128
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
As usual with mobile useragent strings, the real story is more complicated: www.whatismybrowser.com/blog/puffin-browsers-new-user-agent-format

:: Code ::
iOS Phone:

Mozilla/5.0 (iPod; U; CPU iPhone OS 6_1 like Mac OS X; en-HK) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.35 Puffin/3.9174IP Mobile

iOS Tablet (iPad):

Mozilla/5.0 (X11; U; Linux x86_64; en-AU) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.35 Puffin/3.9174IT

Android Phone:

Mozilla/5.0 (X11; U; Linux x86_64; en-gb) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.35 Puffin/2.9174AP

Android Tablet:

Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.35 Puffin/2.9174AT

The existing detection needs to remain though; as there are still older versions of Puffin running on people's devices. So you also need to check for the version fragment with the single "M" that has been appearing (which denotes Mobile).

Mozilla/5.0 (X11; U; Linux i686; en-gb) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.35 Puffin/2.0.5603M

Some versions of Puffin also don't have any trailing letter either:

Mozilla/5.0 (X11; U; Linux i686; en-CA) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.35 Puffin/2.0.5603


As you can see, puffin can in fact be a tablet, phone, ios, android, etc, browser. The pattern is hard to parse, and the change puffin did is very hard to efficiently detect compared to more standard useragents, that is, they should have made it: Puffin/AT2.9174 because then it's easy and efficient to detect the type with one pass.

In the case of puffin, they removed android from the useragent string, which was really stupid because that would id it immediately as a mobile device, then their 'fxed' version string didn't correct that error, but simply adds some more complexity. As general incompetence goes, that's pretty normal I find, ie, create chaos where you could have created order by simply listing the OS version, like ios, android, in the user agent string in the first place. This type of randomness is why it's almost impossible to handle mobile devices, there is zero convention, no rules, and it's just whatever undisciplined group decides at random to do one day without any real thought.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4128
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
amazonsilk.wordpress.com/useful-bits/silk-user-agent/

:: Code ::
The Silk User Agent

The general templates for the Silk User Agent on the Kindle Fire and Kindle Fire HD are:

Desktop
Mozilla/5.0 (Linux; U; locale; product-model Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version Safari/webkit-version Silk-Accelerated=cloud-browsing-state

Mobile
Mozilla/5.0 (Linux; U; Android android-version; locale; product-model Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version Mobile Safari/webkit-version Silk-Accelerated=cloud-browsing-state

Desktop
Mozilla/5.0 (Linux; U; en-us; KFTT Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Silk/2.1 Safari/535.19 Silk-Accelerated=true

Mobile
Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; KFTT Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Silk/2.1 Mobile Safari/535.19 Silk-Accelerated=true

Silk UA for Kindle Fire 1st Generation

Desktop
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.0.13.81_10003810) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true

Mobile
Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Silk/1.0.13.81_10003810) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 Silk-Accelerated=true


so silk is the key string there, not my first guess of which was the relevant term in there.

You'll note that the mobile has the term android and mobile in it, which shows that at least someone at amazon is awake and mentally functioning, since the goal of useragents is to make it easy, not hard, to identify the generic format, then specifics after.

However, also note that silk is not in itself adequate to detect mobile, since both desktop and mobile versions exist, sigh.

So as you can see, the silk string you posted:
:: Code ::
Mozilla/5.0 (Linux; U; en-us; KFOT Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.12 Safari/535.19 Silk-Accelerated=true

is in fact a desktop, and the other script is wrong, which is why you NEVER rely on scripts to determine what the user agent is, you go to the source of the useragent string, and then see what it actually is, then you know which script is correct or not correct.

For example, the browser detection script would correctly identify that silk browser on android is mobile, and silk on non android is desktop, but it would fail currently to get that silk is a tablet, that's because detecting tablets is a real pita because they really are just small laptops without keyboards, or very large phones, there's no actual real definition for a tablet.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4128
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
New php browser info handles this now, though I have not handled the idiotic decisions on puffin's part in terms of getting more precise iphone/ipad/ipod data, as you can see from their useragent strings, someone totally incompetent is in charge of that, and they will almost certainly change it again at random, to something else stupid.

These can be testing using the useragent string switcher list I also do:
techpatterns.com/forums/about304.html
Back to top
nsaillant
Status: New User - Welcome
Joined: 14 Feb 2014
Posts: 3
Reply Quote
Hi

Thank you very much for addressing my post so quickly! I really appreciate. I have updated my version of browser_detection ;)

Thanks!
Back to top
Display posts from previous:   

All times are GMT - 8 Hours