【发布时间】:2018-01-24 16:38:07
【问题描述】:
我正在尝试“利用浏览器缓存”来提高网站速度。 webapp 托管在 pythonanywhere 上,我想我需要配置 nginx.conf 文件以包含:
location ~* \.(css|js|gif|jpe?g|png)$ {
expires 168h;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
(来自这里:how to Leverage browser caching in django)
但是我在任何地方都找不到 conf 文件。它不在/etc/nginx, /usr/local/etc /usr/etc ...
这可以在 pythonanywhere 上完成吗?
【问题讨论】:
标签: nginx browser-cache pythonanywhere