Many developers use Internet Explorer to test their web pages before they upload to the web server. But this can result in an information bar that reads indicates that some of the content on this page may be blocked for security purposes. To get the script to load, you might have to click a link to “Allow blocked content.”

Internet Explorer version 6 service pack 2 introduced a security feature where it blocks JavaScript and CSS (in essence any external documents) from running on web pages that are opened from a local machine rather than from the Internet. This is a security feature to keep malicious software from gaining access to your computer. This feature is included in all versions of IE after 6 SP2.

Normally, JavaScript does not have access to things like the computer file system that the browser is running in. But when a file is opened locally, the browser can consider the local file system to be the same as a web server. And “active content” such as JavaScript could get access to that local file system and cause problems.

This is an important security feature for non-web developers because it prevents hackers from sending web pages to users that are intended to be opened locally and thus gain access to the computer.

Most Web Developers Need to Test Locally

However, if you're like most web developers and designers, you need to be able to test your pages locally before uploading to a server, and getting a JavaScript error every time can be frustrating.

First, you need to verify that Internet Explorer is not blocking scripting, ActiveX, and Java.

  1. In Internet Explorer, in the “Tools” menu, go to “Internet Options”
  2. In the “Internet Options” box, click on the “Security” tab
  3. Change your settings to the “Default” level and click “OK”

If that doesn't work, you can go into the IE preferences and completely disable this security setting:

  1. In Internet Explorer, in the “Tools” menu, go to “Internet Options”
  2. Go to the “Advanced” tab and scroll down to the “Security” section
  3. Check the box next to “Allow active content to run files on My Computer” and click “OK”

If you still can't get your script to run, you should upload it to a web server, such as a testing server, and try it there. If the script continues to get errors, then it may be that you have an error in your JavaScript that is affecting the page load.

Posted in: Web Design and Applications

Related FAQ's

Marius Ion ANGEL HOT SOFT LLC (800) 316-7677