Tuning cache controls. In Chrome a reload sets the request header to

max-age=0, but still includes an If-None-Match header.  That means we
sould not depend o a cached ETag, which we don't in any case.  A
shift-reload on the other hand sets the header to no-cache and does not
include an If-None-Match header, meaning this is not a conditional get
at all.
This commit is contained in:
Knut Forkalsrud 2011-07-11 11:03:46 -07:00
parent da61095fb3
commit f95a97aa11

View file

@ -445,7 +445,7 @@ public class AlbumServlet
boolean etagMatches(HttpServletRequest req, String fileEtag) {
String cacheControl = req.getHeader("Cache-Control");
if ("max-age=0".equals(cacheControl)) {
if ("no-cache".equals(cacheControl)) {
return false;
}
String reqEtag = req.getHeader("If-None-Match");