Microsoft 的 ActiveX 和 Google 的 Native Client 有什么区别?

发布于 2024-10-18 10:27:24 字数 1435 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

埖埖迣鎅 2024-10-25 10:27:24

这不是一个很好的比较; NPAPI 和 Native Client 可能是更好的比较。 ActiveX仅适用于IE,NPAPi适用于其他浏览器(包括Chrome)。

Native Client 执行由特殊编译器编译的代码,该编译器会阻止您使用某些类型的操作并提供一些沙箱等;它的目的是允许您编写本机代码,但仍然强制执行浏览器已经遵循的许多安全限制。对于可能的事情来说,这很好——只要您可以让它在您想要使用的浏览器中运行即可。目前 Google Chrome 支持它,但我还没有听说它可以在任何其他浏览器中工作。

相反,使用 NPAPI 或 ActiveX(参见 FireBreath,它允许您同时针对两种类型),您可以编写本机代码并执行或多或少的任何操作一个普通的应用程序就可以做到(除了在 Vista/Win7 上的 IE 中,启用了 UAC,并且处于低完整性模式)。

NaCl 最大的缺点可能是你无法访问硬件;由于它是沙盒的,因此您可以执行的网络操作以及可以连接的设备都受到更多限制。

我强烈建议您阅读有关 NaCl 的常见问题解答:http://code.google.com/chrome/nativeclient/faq.html

对我来说,对于我需要插件的任何项目来说,NaCl 都不是一个可行的选择,原因很简单:似乎只有 Google Chrome 得到完全官方支持

It's not a very good comparison; NPAPI and Native Client is probably a better thing to compare. ActiveX only works on IE, NPAPi works on other browsers (including Chrome).

Native Client executes code that is compiled by a special compiler that prevents you from using certain types of operations and provides some sandboxing and such; it is intended to allow you to write native code but still enforce many of the security restrictions that the browser already follows. For things that are possible, it's great -- as long as you can get it to work in the browser you want to use. Currently it's supported by Google Chrome, but I haven't heard for sure that it works in any other browser.

Conversely, with NPAPI or ActiveX (and see FireBreath which allows you to target both types simultaneously) you write native code and do more or less anything that a normal application could do (except in IE on Vista/Win7 w/ UAC enabled where you are in low integrity mode).

The biggest disadvantage to NaCl is probably that you can't access hardware; since it's sandboxed, you're a bit more limited as to what networking things you can do and a lot more limited as to what devices you can interface with.

I highly recommend reading the FAQ about NaCl: http://code.google.com/chrome/nativeclient/faq.html

To me, NaCl is not a viable option for any of my projects requiring a plugin for the simple reason that only Google Chrome seems to be completely and officially supported.

坏尐絯℡ 2024-10-25 10:27:24

本机客户端为本机代码的执行提供了更安全的环境。而 ActiveX 允许本机代码以用户的完全权限运行。

Native client provides a more secure environment for the native code to execute. Whereas ActiveX lets the native code run with full priviliges of the user.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文