How should I reference my css file (which is in the non-secure area) from a webpage in the secure area. I’ve considered duplicating it (moving one in to the secure area) but this seems very inefficient.
Any advice much appreciated.
(p.s. there will most likely be a few follow up questions ha ha)
You can always avoid the issue by using a relative/rooted path:
If you must use a full URL, I’m not sure why you can’t use the https protocol (which is the correct solution), but there’s one more option: don’t specify a protocol at all.
http://paulirish.com/2010/the-protocol-relative-url/
However:
So if you must specify a full URL, the best/proper way is this:
There’s really no alternative. Relative paths to images and resources in the CSS file itself should work just fine with either approach, and won’t trigger the security error. If you need absolute URLs in the CSS file, then you can use the same trick.