- From: Stephanos Piperoglou <stephanos@webreference.com>
- Date: Thu, 23 Sep 1999 23:28:20 +0300 (EEST)
- To: www-html@w3.org
While writing the next tutorial for HTML with Style [see sig], I came upon Section 18.2.2 of the HTML 4.0 specification, where there exists a certain paragraph I have a gripe with: Authors should specify the default scripting language for all scripts in a document by including the following META declaration in the HEAD: <META http-equiv="Content-Script-Type" content="type"> where "type" is an content type naming the scripting language. Examples of values include "text/tcl", "text/javascript", "text/vbscript". I checked out the IANA registered MIME types (the document [2] was linked from www.iana.org; I assume it's the normative and latest version) and they include none of the above; nor do they include media types for these languages under any top-level media type. Additionally, I don't think the "text" top-level media type is appropriate; quoting from RFC2046 [3], section 3: Plain text is intended to be displayed "as-is". No special software is required to get the full meaning of the text, aside from support for the indicated character set. Other subtypes are to be used for enriched text in forms where application software may enhance the appearance of the text, but such software must not be required in order to get the general idea of the content. Although the semantics are arguable, I think that scripting languages should fall under the "application" top-level media type. JavaScript is human-readable in the sense that it's not a binary format, but hey, so is LaTeX really, or PostScript if you're crazy enough :-) <OFFTOPIC>Don't programming languages deserve their own top-level media type?</OFFTOPIC> And, if you consider current practice, the default mime.types file that came with my copy of Navigator lists Javascript as application/x-javascript. (Navigator itself does not support most HTML content type specifications for scripts; I couldn't find any info on DevEdge Online). I couldn't get a hold of the IE information because most of msdn.microsoft.com is illegible on my NS4.6/Linux, but I vaguely recall IE recognizing application/x-javascript as well. My Apache distro also came with application/x-javascript as the type for JavaScript scripts. Therefore I would propose, in absence of any corrections to the reasoning above, that the above section and all other references to script content types be changed to reflect that (a) none of the above media types have been assigned by the IANA, and hence the x- prefix should be used when describing scripts until something changes on this front, (b) scripts belong under the application top-level media type and (c) the types application/x-javascript, application/x-vbscript and application/x-tcl reflect current practice in this area. [1] http://www.w3.org/TR/REC-html40/interact/scripts.html#h-18.2.2 [2] http://www.isi.edu/in-notes/iana/assignments/media-types/ [3] http://www.ietf.org/rfc/rfc2046.txt -- Stephanos Piperoglou - HTML with Style http://www.webreference.com/html/ THIS WEEK: Style Watch: Take a Stand and Understand the Standard. Prompted by the Web Standards Project's petition to Microsoft, we take a wide-ranging look at Web standards, innovation, and Web-based applications. Where do you want the Web to go today?
Received on Thursday, 23 September 1999 16:26:00 UTC