HTTP Headers
A servlet can set HTTP headers to provide extra information about its response. As we said in Chapter 4, a full discussion of all the possible HTTP 1.0 and HTTP 1.1 headers is beyond the scope of this book. Table 5.2 lists the HTTP headers that are most often set by servlets as a part of a response.
Table 5-2. HTTP Response Headers
|
Header |
Usage |
|---|---|
|
|
Specifies any special treatment a caching
system should give to this document. The most common values are
|
|
|
The HTTP 1.0 equivalent of |
|
|
Used to indicate whether the server is willing to maintain an open
(persistent) connection to the client. If so, its value is set to
|
|
|
Specifies a time when the server can again handle requests, used with
the |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access