WURFL not detecting FireFox 4 successfully

旧时模样 提交于 2019-12-01 09:23:55

You may also need to rebuild FiftyOne.Foundation.dll, source can be found here:

http://51degrees.codeplex.com/

With the new dll in place and the updated web_browsers_patch.xml in the App_Data folder I was able to resolve my FF4 mobile redirection issues.

This is the XML I used:

<device user_agent="Firefox/4.0" fall_back="firefox" id="firefox_4">
  <group id="product_info">
    <capability name="model_name" value="4.0" />
  </group>
</device>

I was using an old version of the DLL and the XML alone was not enough to get FF4 recognized.

I think the easiest way would be to look at the web browsers patch file for wurl. (http://wurfl.sourceforge.net/web_browsers_patch.xml) It contains all the browsers that people usually use. You should have this file in your App_Data folder. You should be able to just update your patch file with a reference to firefox 4, and declare a fallback browser type.

I'm using the user agent string found here: http://hacks.mozilla.org/2010/09/final-user-agent-string-for-firefox-4/

<device user_agent="Firefox/3.5" fall_back="firefox" id="firefox_3_5">
 <group id="product_info">
  <capability name="model_name" value="3.5"/>
 </group>
</device>

could change to:

<device user_agent="Firefox/4.0" fall_back="firefox" id="firefox_4_0">
 <group id="product_info">
  <capability name="model_name" value="4.0"/>
 </group>
</device>

I haven't had this issue before, but this is the way I would approach your issue. Hope this helps :)

Here's the workaround that I found worked for me.

I added the following to the web_browsers_patch.xml then did an iisreset.

  <!-- work around -->
    <device user_agent="Firefox/4.0" fall_back="firefox" id="firefox_4">
      <group id="product_info">
        <capability name="model_name" value="4"/>
        <capability name="is_wireless_device" value="false"/>
      </group>
    </device>
    <device user_agent="Firefox/4.0" fall_back="firefox" id="sony_mylo_ver1_sub1" >
      <group id="product_info">
        <capability name="model_name" value="4"/>
      </group>
    </device>
    <device user_agent="Firefox/4.0" fall_back="firefox" id="sony_mylo_ver1" >
      <group id="product_info">
        <capability name="model_name" value="4"/>
      </group>
    </device>
    <device user_agent="Firefox/4.0" fall_back="firefox" id="stupid_novarra_proxy_sub73" >
      <group id="product_info">
        <capability name="model_name" value="4"/>
      </group>
    </device>
  <!-- end work around -->
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!