Mime type with javascript----text/javascript,application/javascript, and appliation/x-javascript
来源:互联网 发布:富士康java工程师待遇 编辑:程序博客网 时间:2024/04/30 02:15
这两天使用iewatch观察google的网站的时候,发现学到js文件的mime类型为text/javascript,而今天在qq的网站上,使用iewatch发现,有时用text/javascript的,也有使用application/javascript的还有使用appliation/x-javascript的,所有就不太知道这三个mime 类型有什么区别,在google上一搜:
The traditional MIME type for JavaScript programs is
"text/javascript". Another type that has been used is
"application/x-javascript" (the "x" prefix indicates that it is an
experimental, nonstandard type). RFC 4329 standardized the
"text/javascript" type because it is in common use. However, because
JavaScript programs are not really text documents, it marks this type
as obsolete and recommends "application/javascript" (without the "x-")
instead. At the time of this writing, "application/javascript" is not
well supported, however. That might be the reason why
"application/x-javascript" is used by a lot of webpages.
大致意思是:传统的javascript程序的MIME类型是“text/javascript”,其他使用的还有"application/x-javascript"(x前缀表示这是实验性的,不是标准的类型),RFC4329规定了“text/javascript”类型,因为它普遍被使用。然而,javascript程序并不是真正的文本文件,这就表示这个类型已经意味着过时了,而推荐使用"application/javascript"(去除x前缀)。然而,在写程序的时候,"application/javascript"没有很好的支持。这也行就是"application/x-javascript"被使用在很多网页中的原因。
- Mime type with javascript----text/javascript,application/javascript, and appliation/x-javascript
- type="text/javascript" type="application/javascript"
- ios AFN 网络请求失败 failed: unacceptable content-type: text/html application/x-javascript
- <script type="text/javascript">
- type="javascript"和type="text/javascript"
- javascript的mime
- language="javascript"与 type="text/javascript"
- <script language="javascript" type="text/javascript">
- text/javascript和application/json的区别
- <script type="text/javascript" src="">
- Drag and drop with Javascript
- Javascript with
- couldn't find file 'jquery.ui.effect-blind' with type 'application/javascript'
- Javascript
- JavaScript
- javascript
- javascript
- javascript
- Shell 编程速成(1)
- linux shell编程
- 将C/C++头文件转换成C#的解释器
- AIR中文帮助 第一章 什么是 Adobe AIR
- 电脑总是无故自动关机、自动重启和死机原因
- Mime type with javascript----text/javascript,application/javascript, and appliation/x-javascript
- 写Makefile(二)
- 好无奈的一天
- ext
- OJ---N!
- 我们的系统点击登陆时报“没有注册类别.”
- [DirectShow] 简单了解通知事件
- [转]纪念Sun的历史时刻
- HTML标记_HTML大全_HTML标记大全_超文本标记语言(1)【转】