Home‎ > ‎My Notebook‎ > ‎JavaScript Tips‎ > ‎

MarkOfTheWeb

24-Jun-2005 - Mark Of The Web


So this "Local Machine Zone Lockdown" which came with Window XP SP2 is a pain. I'm talking about opening a local HTML document and getting that stupid yellow security message across the top of IE. \\
(Note: Other browsers and embedded IE do not show this message)

You can turn it off completely but that leaves a security hole. There is another way. When you save a web page to you local machine it puts the "mark of the web" MOTW in the file.

The MOTF forces the HTML doc into another zone. Internet Explorer recognizes "about:internet" as a valid URL.

Bottom line — Add the following to the top of all your HTML pages:

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


and the security warning goes away.

I just used FAR to replace <html> with \\
<!-- saved from url=(0014)about:internet -->
<html>

in all my HTML files. Beautiful!! \\

Read more here \\
http://weblogs.asp.net/jgalloway/archive/2004/08/20/218123.aspx (external link) \\

Warning:
MOTW does not work on HTML pages containing: \\
- JAVA (not to be confused with JavaScript) \\
- Embedded .HHC and .HHK files

Also take great care not to mix content. EG. If you mark your frame docs with MOTW but not the HTML pages, then your HTML pages will show as blank. Why? Because IE security wont let you mix Internet and Local content. So if you create a CD wait until the end of the project and use FAR to insert MOTW on every HTML page that will live on that CD.
Comments