Page 1 of 1
Lynx text-based browser misidentified
Posted: Sat Jan 07, 2012 3:30 pm
by dsoprea
My webpage is currently detected non-tablet mobile devices, and the Lynx text-based browser is detected as one.
It's UA is: Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.8e-fips-rhel5
Dustin Oprea
Re: Lynx text-based browser misidentified
Posted: Wed Jan 11, 2012 9:52 am
by kamermans
Hi Dustin,
The Lynx browser user agent has been in the WURFL for many years, and you version seems to be matching fine:
http://bit.ly/AorBBm
Are you using one of our official APIs, or a custom API?
Re: Lynx text-based browser misidentified
Posted: Wed Jan 11, 2012 10:16 am
by dsoprea
I'm using TeraWurfl, and I've never had a problem with it, previously.
My reference to it, determining what's a mobile device and not a tablet. I also had to explicitly disqualify a Lynx browser since it kept coming up as such.
function IsPhone()
{
require_once realpath(dirname(__FILE__) . '/dynamic/terawurfl/TeraWurfl.php');
$wurflObj = new TeraWurfl();
$wurflObj->GetDeviceCapabilitiesFromAgent();
$isPhone = (
$wurflObj->capabilities['user_agent'] != ''
&& $wurflObj->capabilities['id'] != 'generic'
&& $wurflObj->getDeviceCapability('is_wireless_device')
&& $wurflObj->getDeviceCapability('is_tablet') == false
// Lynx shows up like a mobile browser, for some reason.
&& substr($_SERVER['HTTP_USER_AGENT'], 0, 4) != 'Lynx'
);
return $isPhone;
}
Dustin
Re: Lynx text-based browser misidentified
Posted: Wed Jan 11, 2012 2:07 pm
by kamermans
Thanks for the reply Dustin, I misunderstood the problem. You are correct that the Lynx Browser, although it is being detected properly, has the setting
is_wireless_device = true.
There may have been a historical reason for this, but I think it should be treated as a desktop device at this point.
The is_wireless_device is actually getting set on its fall_back device, generic_xhtml, so the proper solution is to reparent that device from generic_xhtml to generic_web_browser. I've fixed it in our database and if you're a commercial licensee you will see it in the WURFL snapshot on Sunday night.
Alternatively, you can use the following patch to update the data yourself. Save the following as
lynx_patch.xml, then add it to the
PATCH_FILE directive in
TeraWurflConfig.php and do a database update.
Code: Select all
<wurfl_patch>
<devices>
<device user_agent="Lynx/2.8.6rel.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.0.4" fall_back="generic_web_browser" id="lynx_textonly_browser"/>
</devices>
</wurfl_patch>
Re: Lynx text-based browser misidentified
Posted: Wed Jan 11, 2012 11:23 pm
by dsoprea
Great. Thanks. I'm an open-source user.. When will it make it's way to those database updates?
Dustin