Web的标记总是确保IE运行本地HTML文件 [英] Will The Mark of the Web always ensure IE runs local HTML file

查看:99
本文介绍了Web的标记总是确保IE运行本地HTML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在发布一张CD,在AutoRun上显示基于HTML的菜单。菜单(本地HTML文件)在用户浏览器中运行,并传递有关CD上的内容(自定义软件包,因此不是安装程序)的信息。我们的菜单严重依赖JQuery,所以不能运行Javascript并不好。我们选择使HTML,CSS,Javascript中的菜单达到跨平台兼容性。



因为我们运行一个使用Javascript的本地HTML文件,所以我们遇到了IE的限制运行脚本或ActiveX控件



我们的解决方案()是使用网络标志。但我们有一个问题:

这是能够克服IE消耗的银弹吗?



Web的标记是否可以在IE V8上运行?我可以肯定地说,这会克服IE的限制,还是有其他因素需要考虑?

成为银弹。其中一个原因包括MOTW,实际上,第一个原因是:


  • 您正在编码的页面将从CD中查看, DVD或其他本地存储设备。 (请注意,用户可以但不一定免除本地内容的安全功能。)






以下代码会导致文件在Internet区域中运行,这将删除IE发出的限制。请注意,某些用户设置可能会阻止此代码正常工作,或者用户可以手动绕过此功能并强制窗口以正常方式运行,这将阻止您的JS运行。

 <! - 从url保存=(0014)about:internet  - > 

没有关于它应该放在哪里的具体细节评论必须在HTML标记中出现在HTML文档的前2048个字节中。



至于关于兼容性的问题,介绍了该功能在> Microsoft Internet Explorer 4.0 中,并且与每个版本都兼容。


We are distributing a CD that displays our HTML based menu on AutoRun. The menu(a local HTML file) runs in the users browser and communicates information about whats on the CD (a Customisation Package so NOT an installer). Our menu relies heavily on JQuery so not being able to run Javascript is not good. We chose to make the menu in HTML, CSS, Javascript to achieve cross-platform compatibility.

Because we are running a local HTML file that uses Javascript we encounter IE's restriction from running scripts or ActiveX Controls.

Our solution (according to our previous question) is to use The Mark of the Web. But we have one question:

Is this the silver bullet that will overcome IE's restrition?

Will The Mark of the Web work on IE V8 and up? Can I say with certainty that this will overcome IE's restriction or are there other factors I need to consider?

解决方案

This does indeed appear to be "The Silver Bullet". One of the reasons to include MOTW, in fact, the first reason is:

  • You are coding pages that will be viewed from a CD, DVD, or other local storage device. (Be aware that users can, but won't necessarily, exempt local content from this security feature.)

The following code causes the file to be run in the Internet zone, which will remove the restrictions placed by IE. Please note that some users settings can prevent this code working, or a user can manually bypass this feature and force the window to run in the normal way which will prevent your JS from working.

<!-- saved from url=(0014)about:internet -->

There is no specifics on where it should be placed appart from The comment must appear in the first 2,048 bytes of the HTML document, within the HTML markup.

As for your question regarding it's compatibility, the feature was introduced in Microsoft Internet Explorer 4.0 and is compatible with every version from there up.

这篇关于Web的标记总是确保IE运行本地HTML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆