Hosting YUI on SSL Site - IE Errors

I am using YUI on my site. It works fine with no error when accessing HTTP. However, when IE users access the site over HTTPS, they receive the dreaded "This page contains safe and unsafe elements" message , which makes it really close to unusable.

I am hosting YUI files, so they are processed over HTTPS, but in the CSS file, it is referencing the image file over HTTP, which is causing the IE error message:

background:url(http://yui.yahooapis.com/2.7.0/build/assets/skins/sam/sprite.png)

      

Any suggestions on how to suppress this error? There are a ton of HTTP links in CSS.

+2


source to share


5 answers


Go to http://developer.yahoo.com/yui/2/ and download the complete developer kit, copy the build folder to wherever you want YUI to be hosted. Do a global search / replace in your YUI CSS for

http://yui.yahooapis.com/2.7.0/build/



and replace it with the path of the YUI build folder on your site. I assume you took the combined CSS from the YUI dependency tool and don't need it, so the easiest way is to convert it.

+5


source


If you want to use hosted files, you can choose between Yahoo and Google Content Delivery Networks. Yahoo, the web supports combo processing; Google supports SSL.

Check the YUI Dependency Configurator



Select Google as your CDN and change the base url to https: //

+7


source


You will need to change your links to HTTPS. I don't know if YUI server permits on yahoo (or you can host them yourself and redirect the css file to point to your server), but this is the only way to get rid of the post.

+1


source


linking to assets without URL protected is going to throw these warnings. SSL requires everything to be served from secured URLs. Either host the files locally or see if yahoo provides a secure source file option.

+1


source


Hosting everything on your side and using relative URLs are generally the best options for no SSL issues.

I suggest you download this file, host it on your side, and not use absolute URLs (http or https).

0


source







All Articles