|
124
|
| Craig McQueen · 技术社区 · 18 年前 |
|
|
1
133
这是一个常见的错误。javascript的MIME类型多年来一直没有标准化。就是现在 officially : " 应用程序/javascript ". 这里真正的问题是,大多数浏览器无论如何都不会使用该属性,至少在script标签的情况下不会。他们实际上会窥探数据包内部,并自行确定类型。 因此,最重要的是,就javascript而言,type=“text/javascript”没有任何作用,但它是两者规范的一部分 HTML 4 和 XHTML 1.0 . |
|
|
2
21
这是我找到的关于这个话题的第一页,对它没有任何意义。 我的集体研究表明:
摘要:目前,如果您希望您的html/xhtml在MSIE中工作并与W3C验证,请声明
|
|
|
3
4
|
|
|
4
2
在脚本标签中,我会使用
有趣的是
RFC
标准化
|
|
|
5
1
定义Javascript MIME类型的官方RFC是 RFC4329 .
7. JavaScript Media Types
7.1. text/javascript (obsolete)
Type name: text
Subtype name: javascript
Required parameters: none
Optional parameters: charset, see section 4.1.
Encoding considerations:
The same as the considerations in section 3.1 of [RFC3023].
Security considerations: See section 5.
Interoperability considerations:
None, except as noted in other sections of this document.
Published specification: [JS15]
Applications which use this media type:
Script interpreters as discussed in this document.
Additional information:
Magic number(s): n/a
File extension(s): .js
Macintosh File Type Code(s): TEXT
Person & email address to contact for further information:
See Author's Address section.
Intended usage: OBSOLETE
Restrictions on usage: n/a
Author: See Author's Address section.
Change controller: The IESG.
7.2. application/javascript
Type name: application
Subtype name: javascript
Required parameters: none
Optional parameters: charset, see section 4.1.
Encoding considerations:
The same as the considerations in section 3.2 of [RFC3023].
Security considerations: See section 5.
Interoperability considerations:
None, except as noted in other sections of this document.
Published specification: [JS15]
Applications which use this media type:
Script interpreters as discussed in this document.
Additional information:
Magic number(s): n/a
File extension(s): .js
Macintosh File Type Code(s): TEXT
Person & email address to contact for further information:
See Author's Address section.
Intended usage: COMMON
Restrictions on usage: n/a
Author: See Author's Address section.
Change controller: The IESG.
|
|
|
sAnS · 文件十六进制值检查不起作用 8 年前 |
|
|
Jan Testowy · 与Spring安全性相关的MIME类型错误 8 年前 |
|
Wayne Kaskie · How to address error“未在“script name”处加载脚本,因为在给定“X-Content-Type:nosniff”时不允许使用非脚本MIME类型 8 年前 |
|
|
Silent · 蔚蓝色的mp4上传失败 9 年前 |