Improved our steps to avoid caching of responses. It now seems that
both Mozilla and IE actually do not cache stuff that has res.cache == false.
This commit is contained in:
parent
8112e2a40c
commit
99e764a7b0
1 changed files with 5 additions and 7 deletions
|
@ -241,13 +241,11 @@ public abstract class AbstractServletClient extends HttpServlet {
|
||||||
|
|
||||||
if (!hopres.cache || ! caching) {
|
if (!hopres.cache || ! caching) {
|
||||||
// Disable caching of response.
|
// Disable caching of response.
|
||||||
if (isOneDotOne (req.getProtocol ())) {
|
|
||||||
// for HTTP 1.0
|
// for HTTP 1.0
|
||||||
|
res.setDateHeader ("Expires", System.currentTimeMillis ()-10000);
|
||||||
res.setHeader ("Pragma", "no-cache");
|
res.setHeader ("Pragma", "no-cache");
|
||||||
} else {
|
|
||||||
// for HTTP 1.1
|
// for HTTP 1.1
|
||||||
res.setHeader ("Cache-Control", "no-cache");
|
res.setHeader ("Cache-Control", "no-cache, no-store, must-revalidate, max-age=0");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ( hopres.realm!=null )
|
if ( hopres.realm!=null )
|
||||||
res.setHeader( "WWW-Authenticate", "Basic realm=\"" + hopres.realm + "\"" );
|
res.setHeader( "WWW-Authenticate", "Basic realm=\"" + hopres.realm + "\"" );
|
||||||
|
|
Loading…
Add table
Reference in a new issue