CSS Protocol URL for Multiple Subdomains

Our php-based site recently added ssl certificates to support the https protocol, and we are having problems with IE6 through IE8, although our pages do not have resources called via http.

I read this post: http://paulirish.com/2010/the-protocol-relative-url/

So basically, I need to replace everything

background: url('/images/whatever.gif');

Via:

background: url('//www.mydomain.com/images/whatever.gif');

I do not really like using my domain name for several hundred css files to start with, but suppose I do: what would be the best way to do this for my development, testing and middleware environment, different subdomains than production sites. I will need to use dynamic representations of the domain name in css files, most likely from some configuration file, but how?

+5
source share
3 answers

You do not need to add your hostname to use protocol related URLs. The form that you are already using is protocol because it does not indicate the protocol.

Can you describe the problems you have? Have you confirmed that the domain name URL will solve your problem?

PS: If you have hundreds of CSS files, you will probably be happier with a dynamic generation system, but this is a separate issue.

+7
source

- IE6, 7, 8, , ( http-, https). Chrome, FF4 IE9 , . , http.

, , URL- . (http://blogs.msdn.com/b/ieinternals/archive/2009/06/22/https-mixed-content-in-ie8.aspx) MSFT, :

, URL- :

":/images/lightview/inner_slideshow_play.png"

, URL- . , IFRAME . URL- : , .

...

, : IE6 "about: blank" , "javascript:" "res:". IE7 "about: blank", javascript res.

, MSFT , IFRAME , .

URL-, , , URL-, . , "background: url ('/images/whatever.gif'); , - IE6 8.

- : . javascript, , , :

<input target="_blank"class="sub" type="button" style="background-image:url(../images/name.gif);">
+1

! .

, - - , IE6, IE7 IE8 - https, , script: http://www.enhanceie.com/dl/scriptfreesetup.exe

, , , . , ../ .

, - Ned, .

0
source

All Articles