I don't want the browser to cache a specified jsp, so I used the code below in my jsp:
<%
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
%>
However, it doesn't work. Everytime I press the back button, the browser shows the cached page without refreshing.
Does the position of the code in the jsp matter? How to disable the cache?