views:

157

answers:

2

I just face this problem when starting to use Ubuntu. I wonder why Request.Browser.Browser.ToLower().IndexOf("firefox") return true for firefox on windows but false for firefox on Ubuntu?

+2  A: 

Look at the return value of Request.Browser.Browser.ToLower() to see what Ubuntu has there. Most probably it's called iceweasel instead of firefox there.

David Schmitt
A: 

If you must use browser detection...try using something like jQuery's .support functions.

Check WhatIsMyUserAgent or some similar site for what Ubuntu's Firefox builds are actually sending.

I believe Firefox is supposed to be in the FF UA string on Ubuntu...but I know for a fact Gecko is in the string, as that's the rendering engine used.

Broam