There's a lot in the archives on this topic!
Anyway, I use
res.setHeader("Cache-Control", "no-store");
res.setDateHeader("Expires", 0);
and this seems to work on IE 5.0 and Netscape 4.6
Ganesh
----Original Message Follows----
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: preventing the browser from caching pages
Date: Thu, 6 Jan 2000 16:51:10 +0600
MIME-Version: 1.0
Received: from [204.160.241.28] by hotmail.com (3.2) with ESMTP id
MHotMailBA3DC5760082D82197B8CCA0F11CB1520; Thu Jan 06 03:20:23 2000
Received: from mail (mail.java.sun.com [204.160.241.28])by mail.java.sun.com
(8.9.3+Sun/8.9.3) with ESMTP id DAA08385for <[EMAIL PROTECTED]>; Thu, 6
Jan 2000 03:18:58 -0800 (PST)
Received: from JAVA.SUN.COM by JAVA.SUN.COM (LISTSERV-TCP/IP release 1.8d)
with spool id 3560840 for [EMAIL PROTECTED]; Thu, 6 Jan
2000 02:59:58 -0800
Received: from relay5.smtp.psi.net (relay5.smtp.psi.net [38.9.28.2]) by
mail.java.sun.com (8.9.3+Sun/8.9.3) with ESMTP id CAA02730 for
<[EMAIL PROTECTED]>; Thu, 6 Jan 2000 02:49:56 -0800 (PST)
Received: from [38.163.194.4] (helo=mainsvr.techprov.com) by
relay5.smtp.psi.net with esmtp (Exim 1.90 #1) for
[EMAIL PROTECTED] id 126ATl-00048X-00; Thu, 6 Jan 2000
05:49:17 -0500
Received: from smtplk.tpi.techprov.com (TPIGATE [12.18.35.180]) by
mainsvr.techprov.com with SMTP (Microsoft Exchange Internet Mail
Service Version 5.5.2448.0) id CH50GKYM; Thu, 6 Jan 2000 05:45:13
-0500
Received: from 192.1.1.3 by smtplk.tpi.techprov.com with SMTP (Microsoft
Exchange Internet Mail Service Version 5.0.1457.7) id C13YRNQR; Thu,
6 Jan 2000 16:42:57 +0600
Received: by tpi.techprov.com(Lotus SMTP MTA SMTP v4.6 (462.2 9-3-1997)) id
4625685E.003B9E6E ; Thu, 6 Jan 2000 16:51:11 +0600
>From [EMAIL PROTECTED] Thu Jan 06 03:30:25 2000
X-Lotus-FromDomain: TECHPROV
Message-ID: <[EMAIL PROTECTED]>
Sender: [EMAIL PROTECTED]
Hi all,
I have used the following methods to prevent caching of pages sent from the
server side at the browser side:
Method 1
--------------
res.setHeader("Pragma","no-cache");
// code
Method 2
--------------
res.setHeader("expires","0");
// code
Both the above have worked with Netscape 4.7 but not with IE 5.0. Is there
any particular reason for this? Am I invoking the methods correctly?
Are there any other methods I could use which would work with both
browsers?
Thanks,
Sanjiv
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html