PDA

View Full Version : text/javascript or application/x-javascript


Samji
10-24-2006, 01:31 PM
Hello everyone.

I have been working for JavaScript for a little while now and have been wondering which is the correct or recommended MIME type to refer to it as:


text/javascript


or


application/x-javascript


I have been using text/javascript up to now, but I have noticed that on GNOME desktop JS files are listed as having the MIME type application/x-javascript.

Which should I use? Thanks in advance. ;)

rg3
10-24-2006, 01:57 PM
text/javascript is marked as obsolete at the official IANA page (http://www.iana.org/assignments/media-types/text/). Moreover, according to RFC 4329 (http://www.rfc-editor.org/rfc/rfc4329.txt), you should use application/javascript.

Samji
10-26-2006, 04:56 AM
Okay. Thanks for the feedback.

NetNessie
10-30-2006, 08:09 AM
What does the x- prefix denote anyway? I notice only IE seems to use it.

rg3
10-30-2006, 12:09 PM
It seems to denote experimental, yet-unofficial MIME types. The registration process is explained in RFC 2048 (http://www.ietf.org/rfc/rfc2048.txt).

Samji
11-20-2006, 02:40 PM
It seems to denote experimental, yet-unofficial MIME types. The registration process is explained in RFC 2048 (http://www.ietf.org/rfc/rfc2048.txt).

I used application/x-javascript thinking it would work with IE, but I ended up having to use text/javascript or it wouldn't work in it.

NetNessie
12-20-2006, 06:36 AM
It seems to denote experimental, yet-unofficial MIME types. The registration process is explained in RFC 2048 (http://www.ietf.org/rfc/rfc2048.txt).

rg3, your the new genius of standards documentation.