only html file no-cache

Nginx User nginx at nginxuser.net
Sat Dec 31 13:26:23 UTC 2011


Try this shorter form:

location / {
	location ~ \.(html|htm)$ {
		# "pragma" is not a valid header here
		add_header Cache-Control "no-cache, no-store";
		try_files $uri @backend;
	}
	expires 7d;
	try_files $uri @backend;
}



More information about the nginx mailing list