Sometimes while you are visiting a secure site, you may see your IE show this warning message "This page contains both secure and nonsecure items. Do you want to display the nonsecure items?"
As a user this is not only inconvenient but some may find it a bit scary as well.
As a developer you must ensure that your users do not get any such warning, there are few things you must keep in mind. Most of the time such warnings are generated as result of including a non secure content like an image or stylesheet in the secure page with absolute URL which is using standard http protocol to get the content.
say "http://www.example.com" has an image "image.jpg" included in the page. The secure site, "https://www.example.com" is using the same image but the image source attribute is set as "http://www.example.com/image.jpg". here is your problem content. Copy the logo to the secure site and load it from there. All you need to do here is use "https://www.example.com/image.jpg" as the image source attribute and the user will no longer get the warning message about mixed content.
Sometimes this warning is also generated because of IFRAME tags in your page. If you have an IFRAME in your page, ensure that its source attribute is set. If there is no source attribute set for the IFRAME, or set to null, user will be displayed this warning message. When you set the src, make sure it points to a real file.
If you are unable to find the culprit content, try debugging it in Firefox, using the Web Developer extension or Firebug. These extensions allows you to look at detailed information including the paths of various objects/ contents in the page.
No comments:
Post a Comment