开发者

How to get MAC address client side with js,flash,java or etc. with crossbrowser method

How can I get the MAC address (or something unique for each pc -at least standard user knowledge level-) from client side with js,flash,java or etc. using a crossbrowser method? You pro开发者_StackOverflow中文版bably know when we are coding a poll we should use cookies to prevent multiple voting. I couldn't find a crossbrowser javascript method (without MS IEs activex). Javascript, java applet or flash files will be welcome. Thank you Caglar


There are no standard Javascript APIs for getting a mac address.

It is possible to get this information using a Java applet, but it would need to be signed and have a policy file in order to access hardware info, and it wouldn't really be transparent to the user. See Getting MAC address on a web page using a Java applet

If you just need to track a client, the most reliable thing you can do is use a combination of APIs available to Javascript to create a persistent cookie. It's possible to create a very resilient cookie using a combination of standard HTTP cookies, session storage APIs, caching tricks, and plugins. Evercookie is a great example: http://samy.pl/evercookie/


You can't do that with JavaScript. Otherwise any one can lure you to visit their website will be able to peek your MAC address, and that would be a security issue. You can only do it through plug-ins. And the browser will have to prompt user to explicitly allow that plugin first.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜