你需要去設定適當的 HTTP 標頭屬性,來避免由 JSP 網頁所輸出的動態內容被瀏覽器存放到快取區中。你需要在把資料送到瀏覽器之前將下列的敘述放到頁面開頭:
<%
response.setHeader("Cache-Control", "no-cache");
response.setHeader("pragma", "no-cache");
response.setDateHeader ("Expires", "Sun,26 Apl 2001 09:00:00 GMT");
//Date in the past
%>在 IE 5.0 之中,關掉網頁快取會因為緩衝區而產生一些問題。而同時為 Mozilla 和 Internet Explorer 瀏覽器去檢查 history 設定會是比較好的做法。