Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have an index html page, and inside this html page I have something like:

<link href="http://www.extenaldomain.com/style.css" rel="stylesheet" type="text/css"></link>

if I run my html without using SSL (ie. http://www.mydomain.com/index.html) then all the styling applies to the html which is good, however if I run https://www.mydomain.com/index.html) then none of the rules in the css apply to the html.

So, besides downloading the style.css from externaldomain.com into my mydomain.com is there any way to make it work?

share|improve this question
Can the stylesheet on the external domain be accessed through both http and https? If so, use //www.external.domain.com/style.css. – Rick yesterday
no, I can't externaldomain doesn't have ssl installed – Josh yesterday

1 Answer

You basically shouldn't be mixing SSL and non-SSL content in your browser. Since your page is loaded in SSL, anything you do in it should also be secure. I believe some browsers will still load the content with only a warning message instead, but in any case, you shouldn't be mixing them.

If it's not terribly important that that page be secure, I would just disable https from that one page while someone is viewing it

share|improve this answer
I know I shouldn't but I have no choice. what I'm trying to do is, mydomain.com will have an <iframe> and inside the iframe it will load the externaldomain.com/index.html something like that. So mydomain.com has SSL installed but most of the externaldomain.com won't have SSL installed. so If I access https: www.mydomain.com/index.html and the iframe is loading, images are loading as well it's just the css (and probably javascript) won't load – Josh yesterday
If you are not transferring any sensitive data (like user login stuff) on that particular page, you can disable SSL only when you are on that page. – Lochemage yesterday
unfortunately I can't disable the SSL. The only way I can think of is, get the content from the externaldomain.com/something.css then manually load it into the iframe. Anyone else has any other idea? – Josh 3 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.