- From: Ian B. Jacobs <ij@w3.org>
- Date: Mon, 18 Sep 2006 16:34:15 +0000
- To: Nick Levinson <nick_levinson@yahoo.com>
- Cc: site-comments@w3.org
- Message-Id: <1158597255.19717.58.camel@jebediah>
On Sat, 2006-09-16 at 23:48 +0000, Nick Levinson wrote: > > The following, which appear on your website and seem > to be a model for various other websites, vary: > > <meta http-equiv="Content-type" > content="text/html;charset=UTF-8" /> > <meta http-equiv="Content-Type" content="text/html; > charset=utf-8"/> > <meta http-equiv="Content-Type" > content="text/html;charset=utf-8" /> > <meta http-equiv="Content-Type" content="text/html; > charset=UTF-8"> > <meta http-equiv="Content-Type" content="text/html; > charset=utf-8"/> > > The content values differ by 1 space, the charset > value is variously capitalized, and the http-equiv > value is variously capitalized. Assuming we apply the > convention that all should end in > space-slash-closing-angle-bracket, are all of these > correct? Hi Nick, The HTML 4 specification does not define a normative set of values for the meta/http-equiv and meta/content (see the attribute definitions [1]). Thus, the HTML 4 specification would not have any say over case-sensitivity of values or spacing. http-equiv is meant to provide some information to servers [2]: "HTTP servers use this attribute to gather information for HTTP response message headers." Thus, I believe that it is up to each server to decide when and how to manage these hints provided by the author. I do not have any data handy on how various servers interpret these meta elements. My guess is that servers would _benefit_ by being very permissive as far as the case of attribute values and internal spacing. Here's one example from apache [3] regarding the AddType directive: "The extension argument is case-insensitive, and can be specified with or without a leading dot." That doesn't address the question of how the <meta> element in an HTML file gets converted into the content type in a server response, nor does it state that media types themselves are case-insensitive, but it does show that the server documentation may well be the place to look for this sort of information. - Ian [1] http://www.w3.org/TR/html401/struct/global.html#edef-META [2] http://www.w3.org/TR/html401/struct/global.html#adef-http-equiv [3] http://httpd.apache.org/docs/1.3/mod/mod_mime.html#addtype > The first two are from > http://www.w3.org/International/tutorials/tutorial-char-enc/#Slide0270, > as accessed Sep. 5, 2006, in reverse order; the third, > from http://www.w3.org/International/O-charset, as > accessed Aug. 31, 2006; the fourth, from > http://www.w3.org/Talks/1999/0830-tutorial-unicode-mjd/slide35-0.html, > as accessed Aug. 31, 2006; and the last, from > http://www.w3.org/International/tutorials/tutorial-char-enc/, > as accessed Aug. 31, 2006, which also contained one > identical to the second, from a different source. > > I take it the following, which I had been using > although I don't remember where I found or derived it, > is wrongly punctuated: > > <meta http-equiv="Content-Type" content="text/html" > charset="UTF-8" /> > > While I program in XHTML and did in HTML, perhaps > these are relevant to other W3C languages as well. > > Thank you. > > -- Nick > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > -- Ian Jacobs (ij@w3.org) http://www.w3.org/People/Jacobs Tel: +1 718 260-9447
Received on Monday, 18 September 2006 16:35:04 UTC