有什么方法可以从浏览器中检测用户的Mac硬件模型吗? [英] Is there any way to detect a user's Mac hardware model from the browser?
问题描述
我想看看是否有人可以直接从浏览器中检测出用户所拥有的Mac计算机型号.又称为"MacBook Pro(2007年中/晚)"或"MacBook Air(2008年末或更高)."
I wanted to see if anyone knows if it's possible to detect what Mac computer model a user is has, straight from the browser. Aka "MacBook Pro (Mid/Late 2007)" or "MacBook Air (Late 2008 or newer)."
这可能是一个远景,但是由于Mac浏览器通过userAgent(http://www.quirksmode.org/js/detect.html)提供了操作系统,所以我认为可能会有机会.
This is probably a long shot, but since Mac browsers provide the OS via userAgent (http://www.quirksmode.org/js/detect.html), I thought there could be a chance.
推荐答案
不是. User-Agent
标头提供了一些信息,但不多:
Nope. The User-Agent
header provides some information, but not much:
Mozilla/5.0(Macintosh;英特尔Mac OS X 10_6_8)AppleWebKit/536.11(KHTML,例如Gecko)Chrome/20.0.1132.47 Safari/536.11
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11
您可以通过访问 http://whatsmyuseragent.com/或转储User-Agent
自己进行测试.您最喜欢的服务器端语言的标题.
You can test this yourself by going to http://whatsmyuseragent.com/, or dumping the User-Agent
header in your favorite server-side language.
类似的信息可以在JavaScript的navigator
对象中找到:
Similar information can be found in the navigator
object from JavaScript:
appCodeName: "Mozilla"
appName: "Netscape"
appVersion: "5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11"
cookieEnabled: true
geolocation: Geolocation
language: "en-US"
mimeTypes: MimeTypeArray
onLine: true
platform: "MacIntel"
plugins: PluginArray
product: "Gecko"
productSub: "20030107"
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11"
vendor: "Google Inc."
vendorSub: ""
__proto__: Navigator
获取更多信息的唯一方法是通过某种浏览器插件.
The only way to get more information is from a browser plugin of some kind.
这篇关于有什么方法可以从浏览器中检测用户的Mac硬件模型吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!