Re: Browsers downloaded linked files regardless of media type

HTML5 does have some text like this for the 'type' attribute of <link>:

  The type attribute gives the MIME type of the linked resource.  It is
  purely advisory.  The value must be a valid MIME type.

  For external resource links, the type attribute is used as a hint to
  user agents so that they can avoid fetching resources they do not
  support. If the attribute is present, then the user agent must assume
  that the resource is of the given type (even if that is not a valid
  MIME type, e.g. the empty string). If the attribute is omitted, but the
  external resource link type has a default type defined, then the user
  agent must assume that the resource is of that type. If the UA does not
  support the given MIME type for the given link relationship, then the
  UA should not obtain the resource; [...]

(The meaning of "assume" is clarified in the next paragraph as only
applying to the decision of whether to "obtain" the resource, not how to
interpret it once it has been obtained.)

However, the text for the 'media' attribute doesn't say anything about
obtaining the resource, it only prescribes whether to apply the resource.

FWIW, I've no objection to CSS using wording like this.  (I.e. no
objection based on the grounds of the arguments that I previously
presented; I'm not in a position to comment on the issues that Boris
Zbarsky raises.)

pjrm.

Received on Thursday, 27 January 2011 03:56:36 UTC