How to tell IE a HTML file on my disk is not a sec

2019-03-10 02:59发布

Our build script creates a HTML log with some embedded javascript. When I open that in Internet Explorer, I get the yellow warning bar that IE has blocked running "scripts or activex controls".

Since it is a local file, I cannot add it to trusted sites (IE expects a domain here).

I do not want to change security settings for the default zone.

Any idea how to permanently unblock it?

IE version is 7.0.5730.13 on XP Pro.

7条回答
疯言疯语
2楼-- · 2019-03-10 03:22

Probably not what you want to hear but I'm not sure you can. Does Firefox/Opera/Safari complain when you run it in any of those? If it works then that seems like the simplest solution to me.

查看更多
Emotional °昔
3楼-- · 2019-03-10 03:24

You could add The Mark of the Web to the document so that IE will act as if it's from a certain security zone.

查看更多
Rolldiameter
4楼-- · 2019-03-10 03:25

You can always enable ActiveX. I've tested this on Internet Explorer 11, but should work on earlier version of IE:

Tools > Internet Options > Advanced > Security :

(✓) Allow active content from CDs to run on My Computer
(✓) Allow active content to run in files on My Computer
查看更多
Evening l夕情丶
5楼-- · 2019-03-10 03:36

Another option, if it's only IE you need to view it in is to save it as a .hta file.

This makes it a HTML application.

It's as simple as changing the suffix to .hta. Although there are other options you can specify.

For more info:

http://msdn.microsoft.com/en-us/library/ms536496(VS.85).aspx

查看更多
趁早两清
6楼-- · 2019-03-10 03:39

You could set up a local server and save such files in a domain you can now add to the trusted sites, but opening the file in any other browser than IE is easier.

查看更多
淡お忘
7楼-- · 2019-03-10 03:45

Embed the Mark of the Web:

<!-- saved from url=(0016)http://localhost -->
查看更多
登录 后发表回答