pang
pang

Reputation: 4174

firefox browser detection in ubuntu

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?

Upvotes: 0

Views: 372

Answers (2)

Broam
Broam

Reputation: 4648

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.

Upvotes: 0

David Schmitt
David Schmitt

Reputation: 59356

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.

Upvotes: 2

Related Questions