3

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?

Crab Bucket
  • 6,219
  • 8
  • 38
  • 73
Ev.
  • 7,109
  • 14
  • 53
  • 87

3 Answers3

4

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.

joebarbere
  • 10,055
  • 1
  • 16
  • 14
  • Ah thanks Joseph. That solution might work, but I've founnd another one for the time being. Thanks again. I'll do what you suggested and rebuild the DLL too. – Ev. Mar 31 '11 at 22:57
  • I just pulled the compiled DLL from the sourceforge site without rebuilding it from source and it worked for me. Thanks for this tip. I recently moved to a new host and was glaring suspiciously at them... – jeffa00 Apr 14 '11 at 19:25
  • Building the source worked for me, too. I would not trust the dll in the sample downloads. I don't think they update them as regularly with the latest dll. – James Lawruk Apr 25 '11 at 16:11
1

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 :)

Chris Marais
  • 411
  • 2
  • 10
  • That's a lot Teos! I've actually tried that exactly to no avail, but it's exactly what I was thinking. But I'm glad to hear someone else is using the same WURFL. So, you're not having any issues with the new FF4? – Ev. Mar 31 '11 at 04:10
  • I used it for a mobile site recently, but I'm not doing any detection for standard web browsers. If I do manage to get it working, I'll let you know. :) – Chris Marais Mar 31 '11 at 05:23
0

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 -->
Ev.
  • 7,109
  • 14
  • 53
  • 87
  • This DID solve the problem of FF4 downloading the file, but it also raised another one. The new problem is that the browser will now add a new token to the URL. I think this is because the browser is now being detected as some type of browser that does not handle cookies so it's storing state in the URL. So not an idea work around. I found that up upgraded and recompiled my 3rd party device dettction too (51Degrees) and that fixed my problem. – Ev. Apr 07 '11 at 03:59