http.FileServer caching files and serving old versions after edit

后端 未结 4 1892
甜味超标
甜味超标 2020-12-31 11:51

Having issues with the http package in the core of go. It appears that the file contents is cached although the Content-Length in the response body is correct. To demonstrat

4条回答
  •  长发绾君心
    2020-12-31 12:03

    If you use some kind of an proxy, that would be the problem. Some proxies cache frequently used files (usually only .js, .css etc., but usually not .html) and ip addresses. If the server is on your local computer, try to use localhost or 127.0.0.1 instead of an ip address, so the request doesn't go trough the proxy. If it's not you have to configure or disable the proxy to access the newest version of the website. I don't know how common this is but, it would be the problem.

提交回复
热议问题