when I use chrome to visit my index.html(http://49.232.66.45:8080/), I find the request header automatically has Cache-Control: max-age=0, why do this happen? (I use nginx 1.16 and all config is default ant when I visited port 80,It is ok,ant request header do not have cache-control)?。and in this case ,each time I refresh my website,the index.html was get from nginx by network with status 200, I just want to get it from cache or by 304. I want to remove "cache-control" in request header。 I try several methods below,and they do not work ,what should I do?
1.add meta in my index.html (not work)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="cache-control" content="max-age=3600">
<title>Title</title>
</head>
<body>
hello,cache
</body>
</html>
2.change nginx config (not work)
it seems the request header do effect matter!
I just want to remove cache-control in request header,and want to know the reason why it automatically add? need you help!
Aucun commentaire:
Enregistrer un commentaire