apache and nginx configuration not caching files

When developing and debugging the web, I often encounter the annoyance of clearing the cache or forcing a refresh to test due to the browser cache (cache). Provide the apache non-caching configuration and nginx non-caching configuration setting. apache: First make sure that the mod_headers module has been loaded in the configuration file httpd.conf. LoadModule headers_module modules/mod_headers.so We can let the browser read from the server every time according to the file type. Here, we use css, js, swf, php, html, and htm files for testing. Header set Cache-Control “private, no-cache, no-store, proxy-revalidate, no-transform” Header set Pragma “no-cache” nginx: location ~ .*\.(css|js|swf|php|htm|html )$ { add_header Cache-Control no-store; }

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索