|
124
|
| Craig McQueen · 技术社区 · 17 年前 |
|
|
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.
|
|
|
code-geek · Jquery根据单选按钮选择隐藏或显示文本字段 1 年前 |
|
|
Alex · 在轻量级中同时解构和不解构变量 1 年前 |
|
|
Ângelo Rigo · ReactJS映射:如何迭代[关闭] 1 年前 |
|
|
bairog · 从按属性筛选的对象数组字典中创建值数组 1 年前 |
|
|
lokiuucx · JS对象属性返回未定义,尽管对象属性应该有值 1 年前 |