开发者

Google Chrome/Safari Same Browser Name and Version !

I have a asp.net website in which i check for supported browser. That is i user Request.Browser.Browser -- for the browser name and Request.Browser.MajorVersion for the browser version

Problem her开发者_运维知识库e is browser Safari and Google Chrome show me the same value !!! That is AppleMAC-Safari(name) and version would be 5..

How do i differentiate between google chrome and safari then ???

Thanks , Francis P.


For each browser that Request.Browser.Browser can detect, there must be a *.browser file in C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\Browsers. Chrome and Safari are missing in version 2 of the .NET framework, but you can download an updated set of browser configurations from codeplex: http://aspnet.codeplex.com/releases/view/41420

There could possibly occur some compatibility issues (since these files are made for .NET 4). In such cases you may have a look at this blog post: http://stephenwalther.com/blog/archive/2010/03/05/use-asp.net-4-browser-definitions-with-asp.net-3.5.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜