在ubuntu中检测firefox浏览器

时间:2009-07-06 07:22:32

标签: c# ubuntu browser-detection

我刚开始使用Ubuntu时遇到这个问题。 我想知道为什么 Request.Browser.Browser.ToLower()。IndexOf(“firefox”)在windows上为firefox返回true 但对于Ubuntu上的firefox是假的吗?

2 个答案:

答案 0 :(得分:2)

查看Request.Browser.Browser.ToLower()的返回值,看看Ubuntu在那里有什么。最有可能是iceweasel而不是firefox

答案 1 :(得分:0)

如果你必须使用浏览器检测...尝试使用类似jQuery的.support函数。

检查WhatIsMyUserAgent或类似网站,了解Ubuntu的Firefox构建实际发送的内容。

我认为Firefox应该在Ubuntu上的FF UA字符串中...但我知道 Gecko 在字符串中,因为它是使用的渲染引擎。

相关问题