At 09:50 AM 9/10/99 -0700, Benedict Chng wrote:
>Do you mean setting it on the browser? I'm afraid I can't control how the
>user customize their browser. Can you elaborate?
You can set headers on the response your servlet sends to the browser to
control whether or not that response will be cached. Sam mentioned the header
Pragma: no-cache
which is the HTTP/1.0 way of saying "Don't cache this response -- come back
to the server and get a new copy every time the user requests it." In
HTTP/1.1, Pragma is deprecated and the way to say this is
Cache-Control: no-cache
To make sure HTTP/1.0 and HTTP/1.1 caches both do the right thing, the
HTTP/1.1 spec recommends that you set both headers, as follows:
Pragma: no-cache
Cache-Control: no-cache
Set these headers from your servlet or JSP to get the control you want.
You may also be interested in the other values of the Cache-Control header;
see section 14.9 of the HTTP/1.1 spec, available at
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9>, and the
general cache section, at
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13>.
Hope this helps.
Marc Hedlund <[EMAIL PROTECTED]>
Director of Web Applications
BEA WebXpress <http://weblogic.beasys.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