The Expires header specifies when content will expire,or how long content to be fresh. After the time expired, the site will always check back with the server to see whether the database has been changed or not.
Expires: -1 The Expires header specifies when the content should be considered to be out of date. The value -1 indicates that the content expires immediately and would have to be re-requested before being displayed again.
Note: Never use Expires = 0 to prevent caching in your site. The Expires header is sent by the server and passed through to browser by the Server. Expires=0 header can mistakenly return cached content. To solve this problem, set the Expires header to a fixed date that is definitely in the past.
In JSP, setting caching to forever using the Expires header is as simple as using the code that follows:
<%
response.setDateHeader("Expires",Long.MAX_VALUE);
%>
Not at all
helpful Not much
helpful Some what
helpful Very
helpful Extremely
helpful | ||||||||
What could be better? (Optional)
X
Not related to my issue
Too complicated explanations
Too much information
Incorrect information
Unclear information
Incomplete information
Too old information
Do you have any other feedback about this faq ? 1000
|