- From: Bill Bereza <bereza@pobox.com>
- Date: Fri, 23 Jan 1998 13:53:01 -0500 (EST)
- To: Benjamin Franz <snowhare@netimages.com>
- cc: www-html@w3.org
On Fri, 23 Jan 1998, Benjamin Franz wrote: > On Fri, 23 Jan 1998, Neil St.Laurent wrote: > > > At the moment it seems like the TYPE in LINK is absolutely pointless > > since I have to download all of the STYLESHEETS anyways to get their > > correct type. > > No, it is *very* useful. It is a guide to the browser which stylesheets > (scripts, fonts, proprietary extensions, whatever) it can handle and > should load and which it should just skip because it can't do anything > meaningful with them anyway. Thus when a browser encounters: > > <LINK rel=stylesheet type="text/css" href="/stylesheets/default.css"> > <LINK rel=stylesheet type="text/jsss" href="/stylesheets/default.jsss"> > <LINK rel=stylesheet type="text/xsl" href="/stylesheets/default.xsl"> > <LINK rel=stylesheet type="text/dsssl" href="/stylesheets/default.dsssl"> > > it *doesn't* try to load the stylesheets it can't deal with anyway. > > And the answer to the question of 'which overrides which' is: The TYPE and > the Content-Type must match. If they don't its an *ERROR*. Error > handling is agent specific and should not be relied on under any > circumstances. FWIW - Netscape appears to assume that if the Content-Type > is wrong, its JSSS or Javascript. Period. > So, if TYPE and Content-Type mismatches are an error, than TYPE goes from being barely useful to outright dangerous. There's no way that an HTML authour is going to always be able to be sure that TYPE will match Content-Type. If this error can result in the browser blowing up, or some other non-specified action, than it would be safest to avoid the use of TYPE altogethor. Let's say I have this example for a stylesheet: <LINK rel=stylesheet TYPE="text/css" href="/ss/main"> At the moment "/ss/main" might be "text/css", but this could change in the future. Now imagine all the possible things a browser might do with TYPE: Use of TYPE Content-Type matches mismatches 1. Browser ignores TYPE no problem no problem 2. TYPE over-rides MIME type no problem problem 3. Browser uses TYPE to no problem possible problem decide whether or not to load the stylesheet 4. TYPE must match MIME type no problem problem 5. Browser uses TYPE if no problem possible problem an error occurs while using the reported Content-Type 6. Browser uses TYPE as a no problem no problem guide to the user in choosing whether or not to download the item I think this covers all the possible uses of TYPE, and it seems the only safe thing to do would be for the browser to either ignore TYPE or just use it as some helpful thing for the user. Bill Bereza bereza@pobox.com http://www.pobox.com/~bereza/ Beware of all enterprises that require new clothes.
Received on Friday, 23 January 1998 13:53:20 UTC