To mark a response as "never expires," an origin server sends an Expires date approximately one year from the time the response is sent. HTTP/1.1 servers SHOULD NOT send Expires dates more than one year in the future.
The Cache-control/max-age directive is probably easier because you don't have to do any date computations. You just specify how long you want the cache to hold the page in seconds. Cache-control (section 14.9) header for this case looks like:
Cache-control: max-age=31536000
In straight Java:
response.setHeader("Cache-control", "31536000");=S
James Stauffer wrote:
How can I allow the browser to cache URLs (using JSPs and servlets)? i.e. View.jsp can be cached per parameter. /service/WebForms/View.jsp?docuID=25948 should never change.
James Stauffer
---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk
--- You are currently subscribed to jdjlist as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] http://www.sys-con.com/fusetalk
