我正在玩Chrome Dev Tools,我对缓存控制的使用有疑问。
我有一个app.js和application.css的简单应用程序,当我检查工具栏中的禁用缓存时,两个资源都从服务器下载,但当我取消选中它时,app.js不会再次下载它位于浏览器缓存中,但是再次下载了application.css。
我检查了响应头,希望看到一个缓存控制:application.css的no-cache但是......它不在那里。实际上,关于application.css和app.js的缓存控制的响应头中的信息是相同的:没有信息。
任何人都知道或不知道为什么会这样?
由于
编辑:请求和响应标头
"request": {
"method": "GET",
"url": XXXXXXXXXX,
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Accept-Encoding",
"value": "gzip, deflate, sdch, br"
},
{
"name": "Host",
"value": XXXXXXXXXX
},
{
"name": "Accept-Language",
"value": "es-ES,es;q=0.8"
},
{
"name": "Upgrade-Insecure-Requests",
"value": "1"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
},
{
"name": "Accept",
"value": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
},
{
"name": "Referer",
"value": XXXXXXXXXX
},
{
"name": "Cookie",
"value": XXXXXXXXXX
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Cache-Control",
"value": "max-age=0"
}
],
"queryString": [],
"cookies": [
{
XXXXXXXXXX
}
],
"headersSize": 527,
"bodySize": 0
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Date",
"value": "Fri, 21 Apr 2017 08:41:14 GMT"
},
{
"name": "Last-Modified",
"value": "Sun, 16 Apr 2017 11:17:04 GMT"
},
{
"name": "Server",
"value": "nginx/1.10.1"
},
{
"name": "ETag",
"value": "\"58f352b0-7ad\""
},
{
"name": "Content-Type",
"value": "text/html"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Accept-Ranges",
"value": "bytes"
},
{
"name": "Content-Length",
"value": "1965"
}
],