R – How to avoid security message in IE7 when using HTTPS

httpsinternet explorerwarnings

In IE7 my web site always causes the browser to prompt a "Security Information" dialogue box:

This page contains both secure and
non-secure items.

Do you want to display the non-secure items?

How can I avoid getting this message when traveling between non-secure and secure pages (HTTP to HTTPS)?

Best Answer

You need to make sure all your images, script files, CSS files and so on have HTTPS urls if you're on a secure page.

If you view-source and search for "http:" this will soon tell which one (or more) is wrong.

Example:

<script src="script.js" type="text/javascript"></script> - Correct
<script src="https://ssl.google.com/ga.js" type="text/javascript"></script> - Correct
<script src="http://www.google.com/ga.js" type="text/javascript"></script> - Wrong