W3C home > Mailing lists > Public > www-style@w3.org > January 2011

Browsers downloaded linked files regardless of media type

From: Antony Kennedy <antony@silversquid.com>
Date: Wed, 26 Jan 2011 11:40:54 -0800
Message-Id: <CEF9EDE0-10A4-4702-8C02-343D66F8A181@silversquid.com>
To: www-style@w3.org
Safari and Firefox (which are the only I've tested so far) both opt to download a file with an unknown or unsupported media type, and then ignore the contents. The spec does not mention at all what the behaviour should be  it only states how the files should be parsed. Regardless of whether the <link> tag or @import rules are used, the file is still downloaded by the browser.

	<link rel="stylesheet" href="test.css" media="boat" />

	@import url(test.css) boat;

Both of these commands will download a file (you can observe this in a proxy, firebug, or the web inspector).

Any performance gain by serving files only to those devices that can make use of them are bypassed in this instance.

Is this a browser bug? Should the spec be more specific (pun intended)? Or is there an instance in which the downloading of these files might be useful?
Received on Wednesday, 26 January 2011 22:34:45 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:36 GMT