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:
parent
da61095fb3
commit
f95a97aa11
1 changed files with 1 additions and 1 deletions
|
|
@ -445,7 +445,7 @@ public class AlbumServlet
|
||||||
boolean etagMatches(HttpServletRequest req, String fileEtag) {
|
boolean etagMatches(HttpServletRequest req, String fileEtag) {
|
||||||
|
|
||||||
String cacheControl = req.getHeader("Cache-Control");
|
String cacheControl = req.getHeader("Cache-Control");
|
||||||
if ("max-age=0".equals(cacheControl)) {
|
if ("no-cache".equals(cacheControl)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
String reqEtag = req.getHeader("If-None-Match");
|
String reqEtag = req.getHeader("If-None-Match");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue