Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can always avoid the issue by using a relative/rooted path:</p> <pre><code>&lt;link rel="stylesheet" href="/css/screen.css"&gt; </code></pre> <p>If you must use a full URL, I'm not sure <em>why</em> 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.</p> <pre><code>&lt;link rel="stylesheet" href="//example.com/css/screen.css"&gt; </code></pre> <p><a href="http://paulirish.com/2010/the-protocol-relative-url/" rel="nofollow">http://paulirish.com/2010/the-protocol-relative-url/</a></p> <blockquote> <p>If the browser is viewing that current page in through HTTPS, then it'll request that asset with the HTTPS protocol, otherwise it'll typically* request it with HTTP. This prevents that awful "This Page Contains Both Secure and Non-Secure Items" error message in IE, keeping all your asset requests within the same protocol.</p> </blockquote> <p>However:</p> <blockquote> <p><strong>Caveat</strong>: When used on a <code>&lt;link&gt;</code> or @import for a stylesheet, IE7 and IE8 download the file twice. All other uses, however, are just fine.</p> </blockquote> <p>So if you must specify a full URL, the best/proper way is this:</p> <pre><code>&lt;link rel="stylesheet" href="https://example.com/css/screen.css"&gt; </code></pre> <p>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.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload