Re: [Bug 6684] Disregard of RFC 4329 and IANA MIME Media Types

Anne van Kesteren wrote:
> On Mon, 20 Apr 2009 16:48:26 +0200, Julian Reschke 
> <julian.reschke@gmx.de> wrote:
>> (1) Work on revising RFC 4329, un-obsoleting "text/javascript" 
>> (realizing that this is what people use in practice anyway), and
> 
> This makes sense to me. I don't see a particularly strong reason to make
> 
>   <script type=text/javascript>
>     alert(1)
>   </script>
> 
> non-conforming.

I don't think anybody has proposed making this non-conforming (!= 
obsolete). Furthermore, one could argue that the RFC requirements do not 
really apply here anyway, as, when inlined, the script isn't a MIME (or 
HTTP) message anyway.

>> (2) Take the position that the media type referenced in script/@type 
>> has different requirements from content type in HTTP response headers; 
>> in particular, the character set issue goes away as soon as the script 
>> is inlined into HTML. As UAs seem to ignore the type for external 
>> script, it would be possible to recommend application/*script for this 
>> case without breaking anything. The disadvantage for this approach 
>> would be that the spec would need to promote different types depending 
>> on how the script is sent over the wire.
> 
> I'm pretty sure the type attribute on the script element is always 
> honored. The media type specified by the HTTP Content-Type header is not 
> honored however, though the charset parameter is.

Q: do we have information about whether the type attribute is honored 
for external scripts?

> ...

BR, Julian

Received on Monday, 20 April 2009 15:30:14 UTC