Frage

I'm using an 3rd party application for device detection called FiftyOne Degrees (http://51degrees.mobi).

That application uses WURFL (http://wurfl.sourceforge.net/) to find out what type of device requested the page based on the user agent.

This works great, except for in the new Fire Fox 4. I think this is because FF4 was released on the 22nd March 2011 while the WURFL was last updated on the 6th March 2011.

Has anyone else come across this problem? Any work arounds?

War es hilfreich?

Lösung

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.

Andere Tipps

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 -->
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top