Cached stylesheets can be a problem for SSL

Permalink
Anyone understand why a theme's css files are "cached"?

From what I can tell, the files are copied into a folder /files/cache/css/{theme-name}/css/{stylesheet}.css.

Each URL reference in a file, e.g.

background: url('images/bg.png')

is replaced by a full URL:

background: url('http://domain.com/themes/{theme-name}/images/bg.png')

The problem here is that a page loaded using SSL will get "unprotected resources" messages because it includes this style sheet that now has hard-coded http references.

Anyone found a good work-around for this issue?

 

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.