Read more

Internet Explorer will download CSS files twice, if referenced via scheme-less URLs

Arne Hartherz
October 30, 2012Software engineer at makandra GmbH

You can use scheme-less URLs (or protocol-relative URLs Show archive.org snapshot ) to have browsers use the current protocol (HTTP or HTTPS) when loading content referenced with such an URL.

A protocol relative URL doesn’t contain a protocol. For example, http://stevesouders.com/images/book-84x110.jpg becomes //stevesouders.com/images/book-84x110.jpg

Browsers substitute the protocol of the page itself for the resource’s missing protocol. Problem solved!

Illustration money motivation

Opscomplete powered by makandra brand

Save money by migrating from AWS to our fully managed hosting in Germany.

  • Trusted by over 100 customers
  • Ready to use with Ruby, Node.js, PHP
  • Proactive management by operations experts
Read more Show archive.org snapshot

But:

Internet Explorer 7 & 8 will download stylesheets twice if the http(s) protocol is missing.

So if you are working on a publicly accessible site, you can't use it for your stylesheet tags. Everything else works, though.

Posted by Arne Hartherz to makandra dev (2012-10-30 08:39)