Hi,
Which is the best (right?) way of setting the HTTP headers in a S2 app
to prevent the browser to cache the result pages?
I'm testing right now with a servlet filter which match all /* URLs
but the back button is still working (i.e. the previous page is stored
in the browser cache).
Here is the filter code:
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletResponse res = (HttpServletResponse) response;
res.setHeader("Cache-Control", "no-cache");
res.setHeader("Pragma", "no-cache");
res.addDateHeader("Expires", 0);
chain.doFilter(request, response);
}
Am I doing something wrong?
It is best to implement it as a servlet filter? or as an interceptor?
any other way?
TIA,
Gabriel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]