本地网页中的ActiveX内容,以及“网络标记”。 [英] ActiveX Content in a local web page, and "the mark of the web"
问题描述
我正在尝试创建一个人们将在本地硬盘上运行的网页,此页面将显示.wmv视频(也存储在本地),使用Windows Media Player
I'm trying to make a webpage that people will run from their hard drives, locally, and this page will show a .wmv video (which is also stored locally), using Windows Media Player
当我运行这个时,IE会向我显示顶部的ActiveX警告栏,这正是我正在尝试解决的问题。如果我从Web服务器加载它,它加载正常,但从本地磁盘,它不会。
When I run this, IE shows me the "ActiveX Warning" bar at the top, which is what i'm trying to work around. If I load this from a web server, it loads fine, but from the local disk, it won't.
现在,显然,MS添加了网络标记正好解决这个问题,但是,我一直在尝试一段时间使它工作,它只是没有。我仍然得到警告栏。
Now, apparently, MS has added the Mark of the Web thingy precisely to work around this problem, however, I've been trying for a while to make it work, and it just didn't. I still get the warning bar.
网络标记是否仍然可以使用?或者这是某种被弃用的东西?
我做错了什么?我应该遵循所有说明,它看起来像:
Is the Mark of the Web supposed to still work? Or this is some kind of deprecated thing?
Am I doing anything wrong? I'm supposedly following all instructions, it looks like:
我尝试将它放在DOCTYPE之前,在DOCTYPE和<之间。 HTML>,< HTML>之后< HEAD>似乎没什么用。
and I've tried placing it before DOCTYPE, between DOCTYPE and <HTML>, right after <HTML>, in the <HEAD> of the document, etc. Nothing seems to work.
我在IE7和IE8中试过这个
I've tried this in IE7 and IE8
任何想法都会非常感激。
Any ideas will be GREATLY appreciated.
谢谢!!
推荐答案
我一直试着让它发挥作用,但事实并非如此。我仍然得到警告栏。
I've been trying for a while to make it work, and it just didn't. I still get the warning bar.
这里令人沮丧的通常原因是Mark Of The Web包含一个尾随换行符。该换行符必须存在。它必须是一个Windows换行符:CR后跟LF。如果您在一个合理的文本编辑器中编辑您的文件,默认情况下使用普通的LF换行符进行保存,那么您的MOTW将神秘地无法正常工作。
The usual cause of frustration here is that the Mark Of The Web includes a trailing newline. That newline must be present. And it must be a Windows newline: CR followed by LF. If you edit your file in a sensible text editor that defaults to saving with normal LF newlines, your MOTW will mysteriously not work.
MOTW正处于最开始状态该文件,以及字符串文字术语如下所示:
The MOTW is at the very very beginning of the file, and in string literal terms would look like:
"<!-- saved from url=(0014)about:internet -->\x0D\x0A"
Microsoft没有做得很好记录这一点。
Microsoft have not done a good job of documenting this at all.
这篇关于本地网页中的ActiveX内容,以及“网络标记”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!