简体   繁体   中英

SEC7111 issue in IE9 complaining about https content

I get an error in IE9 when my page is loaded in https, it's not like the other threads around here where content is loaded from for ex. http://googleapis .. I've switched all links to be protocol-relative so just //googleapis..

The error I get is from a picture I have on my page, which is loaded from the domain like so;

<img src="<?php echo getRootAddress();?>/images/img.jpg">

This will produce a https link and that's what I find confusing, that IE is saying:

SEC7111: HTTPS security is compromised by https://mydomain.se/images/img.jpg

I'd buy it if the link was just http:// and I have a bunch of other pictures that works fine, and of course I only get this in IE =) Any ideas?

At first glance i would say this looks like a bug in IE (Gasp, that never happens!). To look into the issue i recommend using chrome with Dom Snitch , which will provide accurate and detailed information into mixed content problems.

On a side note, why are you using getRootAddress()? That is a huge mess, you should be using relative urls, like this:

<img src="/images/img.jpg">

If the page is https, this image will be loaded with https. Relative URLs are a common software requirement, I know this is something that is required at my place of work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM