Wednesday, January 4, 2012

disable caching for Java servlet

// Set standard HTTP/1.1 no-cache headers.
response
.setHeader("Cache-Control", "private, no-store, no-cache, must-revalidate");

// Set standard HTTP/1.0 no-cache header.
response
.setHeader("Pragma", "no-cache");

No comments: