问题
So I'm chasing down the non-secure item on my page. I am using the JQuery library to make an accordion menu. I suspect that the maybe the problem. Does anyone know if this href would be problematic? I can't find any blank src paths or http:.
Thanks Nick
回答1:
I had the same problem and I found a wordaround to the "non secure items" alert in IE8+. The alert occurs if you are creating dynamic content with jQuery using wrap() or append() functions, and if this content contains CSS with relative paths to images, or any other external elements.
Exemple :
$('#mynode').wrap('<div style="background:url(/path/to/image.gif);"></div>');
This will display a security alert even if the image is downloaded on the same HTTPS secure connection.
How to fix it :
Use full absolute URL : background:url('https://www.domain.com/path/to/image.gif');
Or use CSS class :
< style > .myclass {background:url(/path/to/image.gif);} < /style >
$('#mynode').wrap('< div class=myclass >< /div >');
回答2:
try opening the page in firefox and looking at the tools > page info > media tab.
this shows you all the media on the page and may give you a clue what is causing the non-secure error.
Josh
回答3:
The answer is 'No'.. Href ='#' will not result in a non secure item warning in IE6.
回答4:
Got it. The Jquery.ui library include that do not specify a src attribute. IE6 will complain about this. The quick and dirty fix was to edit the library.
来源:https://stackoverflow.com/questions/1060267/ie6-nonsecure-items