简体   繁体   English

检测非移动浏览器

[英]Detecting NON mobile browsers

So I'd like to redirect mobile users to a different page. 因此,我想将移动用户重定向到其他页面。 But instead of trying to detect any number of mobile browsers, I'd just like to see if the user is using IE, Firefox, Safari, Chrome, or Opera; 但是,我没有尝试检测任何数量的移动浏览器,而是想看看用户是否正在使用IE,Firefox,Safari,Chrome或Opera。 all other users go to the mobile site. 所有其他用户都转到移动站点。

My biggest problem is detecting regular Safari from mobile Safari. 我最大的问题是从移动Safari中检测常规Safari。

Any good way to do this? 有什么好办法吗?

If you'd ask me, if you stay away from Flash/Silverlight applets, and you don't overdo CSS 3 selectors (although as time passes by, this will become less of a problem...), you really don't need to use browser-specific directions. 如果您要问我,如果您不使用Flash / Silverlight小程序,并且您不会过度使用CSS 3选择器(尽管随着时间的流逝,这将不再是问题...),您真的不会需要使用特定于浏览器的说明。

Using a reset CSS style-sheet would help also. 使用重置的CSS样式表也将有所帮助。 Go see that link for that matters : 去看看那个链接,那很重要:

http://meyerweb.com/eric/tools/css/reset/ http://meyerweb.com/eric/tools/css/reset/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM