Problems with Browsers Lock Icon
Having problems with your cart or page that “should” be secure, but isn’t? Is the lock broken or just not showing at all? Been there, done that. I went through a list of things that should have fixed the problem.
- Check all images are being sent with https
- Check JavaScript code
- Check cookies
Are Your Images Secure?
You can check to make sure all your images are being transfered securely by checking the page properties in your browser. For IE, I couldn’t find a place to check this, but in Firefox you can. In Firefox, go to Tools -> Page Info and click on the Media tab. Once there, double check that all the addresses have “https” on the front of them. If some don’t, check and make sure your pages has “https” in the URL and make sure your image tags don’t retrieve images directly using “http” in the link. Relative URLs are good here.
JavaScript
Make sure you don’t use any JavaScript in any anchor tags’ href attribute. IE doesn’t like it. Just change them over to the onclick attribute and that should work fine.
Using Cookies?
My page uses cookies that were not created to be used securely. When you create a cookie, there should be a parameter (a boolean value) to tell it to be secure or not. I found this not to affect my page from actually showing the lock icon however, it could be or become an issue in the future.
I’m Still Learning Mod Rewrite
All these thing were fine on my page and the lock icon was still not showing up in IE and was still broken in Firefox. My problem was because I had my site setup to force a secure connection on my cart page, and force a non-secure connection on all other pages that didn’t need to be secure. I did this to help with search engine optimization. This was why the lock icon wasn’t showing up though. The cart page’s stylesheet was not being loaded into the page using “https” because I had a mod rewrite code in my .htaccess file forcing everything but the cart page to be transmitted using “http”. So if all else fails, check your .htaccess redirects :P
Filed under: Web Developing on April 7th, 2006
No comments yet :(
Leave a Reply