<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", -1);
%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.services.*" import="java.util.*"
import="java.text.*"%>
<jsp:include page="top.jsp"></jsp:include>
<html>
<head>
<link href="login-box.css" rel="stylesheet" type="text/css" />
</head>
<body onload="getcontacts();deleteContact();">
</html>
I'm trying to prevent my web application from caching, I inserted the following piece of code:
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires", -1);
%>
but it's still caching, when i logout and i press back it still comes back to the last session.any hlep plz. should i insert something else ??