SHTML/SHTM Pages Appear as Source Code in IE 7

Today I had a minor problem. I created an SHTM and/or SHTML file in Dreamweaver. When I attempted to view it in Internet Explorer 7, it appeared as text and displayed all the source code. After doing a substantial amount of research, I found the solution at Sitepoint by Kinloche:

I copied your text to notepad on my PC and named it index.shtml. I right-clicked, opened it with Firefox, and it displayed perfectly! Then tried same thing with ‘open with IE’ and I got your source code just like you. SO - then I tested my own index.shtmls and other docs on my various draft websites. Same result as you. However, if I viewed my SSI’s in the inc folder, I was able to see the page in both broswers. (I use dreamweaver and can see both code and design in it, so haven’t tried the individual files b/4 I guess).

Back to your problem: I was able to see your index.shtml file WHEN I modified IE7: Went into IE Tools / Internet Options / Advanced. Under Security heading, I put check mark by “Allow active content to run on files on my computer”. Close. Get out of IE. Then opened your index file with IE7 and presto. It works. Note1: tried to see if I had “allow active content” turned on in FF, but couldn’t find the option. Note2: I’m quite sure I turned OFF “allow active content” in IE7 because microsoft’s warned how dangerous it could be. MS did say you could “turn it on” site-by-site by “right-clicking on IE’s information bar and selecting “Allow Blocked Content,” but I could not find this anywhere.

Summary: It showed great in my FF 1.5. Neither your index file (nor mine) showed in IE7 until I “allowed active content to run” (also curious why FF 1.5 worked out of the get-go). NOW - can someone interpret this for our friend? Why did my FF work but IE7 wouldn’t until I “allowed active content?” What is the risk of “allowing active content” in IE as bad as Microsoft makes it out to be?

Comments are closed.