« Small HTTP server v3.05.18 | Main | sina 开始测试推出 blog 服务 »
March 3, 2005
Content-Type: application/x-javascript 解决一个大问题
|
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。 https://windtear.net/archives/2005/03/03/000591.html http://windtear.net/archives/2005/03/03/000591.html 应该说这是一个严重的错误 并且是不该出现的错误 不过既然别人犯了 然后解决了 就blog一下 JavaScript 是一个很有前途的东东 你看人家google的gmail多帅 水木的文章也是JavaScript吐出来的 很多很多地方都用js来干大事 apache的配置里面是可以 AddType 的 AddType application/x-javascript .js 错误就在于有人写成了 AddType text/html .js 于是问题就出现了呵呵 直接 HEAD 就可以发现问题所在 telnet ip 80 ...... Escape character is '^]'. HEAD /filename.js HTTP/1.1 HOST: ipcn.org.windtear.net HTTP/1.1 200 OK Connection: Keep-Alive Date: Thu, 02 Mar 2005 15:23:56 GMT Server: Apache Vary: Accept-Encoding Cache-Control: max-age=5184000 Expires: Last-Modified: ETag: "2b2415-ba4f-4226983c" Accept-Ranges: bytes Content-Length: 47695 Content-Type: application/x-javascript Via: Age: 1185 修改就如前面说的 Content-Type 搞正确了就ok |
Posted by windtear at March 3, 2005 6:09 PM