||Two Servlet Filters Every Web Application Should Have|
|Subject:||headers and cache filter|
A better approach to solving the content-type problem others mentioned is to cache the response headers along with the response data. Then when serving content from the cache, apply all the cached headers to the response. This ensures responses served from the cache are identical to the originals.
This approach works very well with the client cache control headers as well, as you can specify a page expiration that is sent to the web browser, and also controls the expiration time in the cache filter.
headers and cache filter
2005-03-18 07:21:21 cowwoc [View]