Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
7.2 HTTP 1.1 Response Headers and Their Meaning
147
no store
: Document should never be cached and should not
even be stored in a temporary location on disk. This header is
intended to prevent inadvertent copies of sensitive information.
must revalidate
: Client must revalidate document with
original server (not just intermediate proxies) each time it is used.
proxy revalidate
: This is the same as
must revalidate
,
except that it applies only to shared caches.
max age=xxx
: Document should be considered stale after xxx
seconds. This is a convenient alternative to the
Expires
header,
but only works with HTTP 1.1 clients. If both
max age
and
Expires
are present in the response, the
max age
value takes
precedence.
s max age=xxx
: Shared caches should consider the document
stale after xxx seconds.
The
Cache Control
header is new in HTTP 1.1.
Connection
A value of
close
for this response header instructs the browser not to
use persistent HTTP connections. Technically, persistent connections
are the default when the client supports HTTP 1.1 and does not specify
a
Connection: close
request header (or when an HTTP 1.0 client
specifies
Connection: keep alive
). However, since persistent con
nections require a
Content Length
response header, there is no reason
for a servlet to explicitly use the
Connection
header. Just omit the
Con
tent Length
header if you aren't using persistent connections. See
Section 7.4 (Using Persistent HTTP Connections) for an example of the
use of persistent HTTP connections from servlets.
Content Encoding
This header indicates the way in which the page was encoded during
transmission. The browser should reverse the encoding before deciding
what to do with the document. Compressing the document with gzip
can result in huge savings in transmission time; for an example, see Sec
tion 4.4 (Sending Compressed Web Pages).
Content Language
The
Content Language
header signifies the language in which the
document is written. The value of the header should be one of the stan
dard language codes such as
en
,
en us
,
da
, etc. See RFC 1766 for
Second edition of this book: www.coreservlets.com; Sequel: www.moreservlets.com.
Servlet and JSP training courses by book's author: courses.coreservlets.com.
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved