Time for action – configuring Squid to ignore the browser reloads
There are three ways to fix this issue using
http_port
and refresh_pattern
directives in the Squid configuration file. Please note that the refresh_pattern
rules apply to both server and client headers and can pose issues if we ignore certain headers and clients may receive stale replies.
Using ignore-cc
We have seen the ignore-cc
option in the HTTP port section previously. If we use this option while specifying the HTTP port, Squid will ignore the Cache-Control
HTTP header from clients and will completely depend on the Cache-Control
headers supplied by the backend web servers. For example:
http_port 80 accel defaultsite=example.com vhost ignore-cc
Using ignore-reload
Using the option ignore-reload
with the refresh_pattern
directive, we can completely ignore the browser reloads and serve the content from cache anyway. However, this may result in serving stale content in some cases. For example:
refresh_pattern . 0 20% 4320 ignore...