有人知道为什么Chrome浏览器会显示我的外部js文件已损坏/无法读取吗?
我试图在没有编码(失败)的情况下保存它们,使用UTF-8(失败),还有其他什么?我在linux。 Firefox工作正常。我的php代码创建的头文件不是Apache。
标题:
请求
GET /cache/js/iuGXtklwZorkyG6kJ2zYlKHf.js HTTP/1.1
Host: 3f9628c3.ngrok.io
Connection: keep-alive
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/66.0.3359.181 Chrome/66.0.3359.181 Safari/537.36
Accept: */*
Referer: http://xxxxxxx.ngrok.io/wePPwJCwedwWxBhytsMaCnAS?test=2
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: authID=d92dde92a9c68261df8e99598a3d6fd3704608ea; g3site=rimjeR11Q4UnUO7AMUuCAYW6pH193b
响应
HTTP/1.1 200 OK
Date: Tue, 12 Jun 2018 09:14:23 GMT
Server: Apache/2.4.18 (Ubuntu)
Cache-Control: no-store, no-cache, must-revalidate, max-age=86400, s-maxage=86400, must-revalidate
Content-Encoding: identity
Pragma: public, cache
Expires: Wed, 13 Jun 2018 09:14:23 GMT
Etag: 72b93c53fee84652c462d792c756f86d
Last-Modified: Tue, 12 Jun 2018 09:13:52 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Access-Control-Allow-Origin: *
Content-Length: 3722
Content-Type: application/javascript
你可以看到Firefox表现得很完美: