mobile_browser vs advertised_browser

I have this HTTP request, I expected this, but WURFL is returning that. Please provide enough data to reproduce the problem.
Undertone
Posts: 5
Joined: Thu May 30, 2013 10:13 am

mobile_browser vs advertised_browser

Postby Undertone » Tue Apr 11, 2017 3:10 pm

Hi,

I took a Chrome on iOS UAString from here https://developer.chrome.com/multidevice/user-agent :

Code: Select all

Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1
Then, querying for the mobile_browser and advertised_browser I get:

Code: Select all

mobile_browser: Safari
mobile_browser_version: 10.0
advertised_browser: Chrome Mobile on iOS
advertised_browser_version: 56.0.2924.75
The problem is that the mobile_browser reports Safari (the browser is actually Chrome on iOS). the advertised_browser reports correctly "Chrome Mobile on iOS".

Do you advice to use advertised_browser capability and not the mobile_browser capability, as mobile_browser clearly reported the wrong browser here?

Thanks,
Ravneet

aaronp
Posts: 242
Joined: Wed Dec 09, 2015 12:39 pm

Re: mobile_browser vs advertised_browser

Postby aaronp » Tue Apr 11, 2017 3:28 pm

Hi Ravneet,

We do recommend using the advertised_browser virtual capability as it will accurately pull the browser directly from the user agent string during run-time.

Let me know if you have any other questions or concerns.

Thanks,

Aaron

Undertone
Posts: 5
Joined: Thu May 30, 2013 10:13 am

Re: mobile_browser vs advertised_browser

Postby Undertone » Tue Apr 11, 2017 3:44 pm

Thanks Aaron, That is good to know.

I do have a question then on how mobile_browser capability is/was working? Doesn't it also look at the UAString? What does run time has to do with this? If this is a offline use case where I have bunch of UAstring, and I provide them to the WURFL C++ APIs and query those two capabilities.

Thanks,
Ravneet

aaronp
Posts: 242
Joined: Wed Dec 09, 2015 12:39 pm

Re: mobile_browser vs advertised_browser

Postby aaronp » Tue Apr 11, 2017 3:49 pm

Hi Ravneet,

The mobile_browser capability is a physical capability in that it's return value is hard-coded, whereas the advertised_browser capability's value is calculated by the API during run-time. This is what distinguishes virtual capabilities from all regular capabilities. The former is a value determined by the content of the user agent string and the latter is a set of pre-determined values.

Let me know if you need any further clarifications.

Thanks,

Aaron


Who is online

Users browsing this forum: No registered users and 3 guests