-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
识别特定浏览器最佳实践 #18
Comments
👍 |
这个东西好!好评哦亲 |
嗯,大道至简,UA 还是蛮好用的。 |
不推荐,但是作为了解的内容 http://browserhacks.com/#ie |
为什么这个问题要回复在这个 issue 里? |
哦,那应该回复到哪个issue |
为什么不新建 |
我想问,浏览器被更改了navigator数据后,得到的信息会变化吗? |
Repository owner
locked and limited conversation to collaborators
Feb 24, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
有时候在模块中需要针对某个特定浏览器进行识别,可以不需要、或不希望依赖 detector 进行识别(例如 sticky 只需要识别 IE6),这里提供一些最佳实践,供需要时参考。
基本原则
isIE6 = !window.XMLHttpRequest;
最佳实践
针对 IE 或 IE 内核浏览器的代码兼容性支持:
针对真实浏览器版本识别,可用于浏览器升级提示,但是为了避免将 IE 内核的浏览器识别为 IE,建议使用 detector:
The text was updated successfully, but these errors were encountered: