4 ms·
Instead of specifying http://example.com/foo.png http://example.com/foo.png or https://example.com/foo.png https://example.com/foo.png, you can just use //examp
by tghw 15y ago
Instead of specifying http://example.com/foo.png http://example.com/foo.png or https://example.com/foo.png https://example.com/foo.png, you can just use //example.com/foo.png. AFAIK the only downside to that is older versions of IE (6 & 7 I think) will download the image twice for some reason.
- spjwebster 15y agoIt's actually IE7 and IE8, and only for CSS file URLs (as opposed to URLs in CSS files). Details of protocol-relative URLs here: http://blog.httpwatch.com/2010/02/10/using-protocol-relative-urls-to-switch-between-http-and-https/ http://blog.httpwatch.com/2010/02/10/using-protocol-relative... ...and the unfortunately double-loading bug for CSS files in IE7/8 here: http://www.stevesouders.com/blog/2010/02/10/5a-missing-schema-double-download/ http://www.stevesouders.com/blog/2010/02/10/5a-missing-schem...