views:

229

answers:

2

I'm working on some advanced browser detection, and I've downloaded the MDBF browser file from CodePlex.

Unfortunately my Request.Browser.Platform, along with a few other things is returning "Unknown" on both my iPad Mac OSX (Snow Leopard) and on Windows7

Does anyone know of a good advanced .browser file out there that does the same thing for non mobile devices as the MDBF does for mobile devices?

A: 

Use Request.UserAgent instead.

Beware that it includes the word Mobile as well:

  Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us)
  AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 
  Mobile/7B367 Safari/531.21.10


From Apple on preparing content for iPad:
http://developer.apple.com/safari/library/technotes/tn2010/tn2262/index.html

Leah
This is all great, but I really like using the `.browser` files. Is there a browser file being maintained for this sort of thing? I'd pay to support a good project rather than maintain my own, or hack the info out of the UserAgent. As new devices are released, this problem will only creep up again and again.
rockinthesixstring
A: 

Use http://51degrees.codeplex.com/. It is an ASP.NET open source module which detects mobile devices and provides auto redirection to mobile optimized pages when request is coming from mobile device. It makes use of WURFL mobile device database. For redirection there is no need to modify existing ASP.NET web application pages.

Apart from this it also gives upto-date mobile capability information like manufacturer, model, screen height & width, image formats supported and MANY MORE...... which helps to customize pages for best mobile output.

Amit Patel
sounds like a sales pitch ;-) ..... I'll check it out.
rockinthesixstring