Resource Accelerate will apply the HTTP caching header directives to all responses from a J2EE. These caching directives indicate to a browser that the browser does not need to make a request to the server for each resource for each new page load. These can provide much faster page load times when navigating between pages that share resources such as CSS, JavaScript, and image files. By default with Tomcat, there are no caching directives sent to the browser. However, there is a last modified date included in the header. Browsers will use this to make If-Modified-Since requests, so that the browser does not need to download the every entire resource file for each page encountered. However, with only the If-Modified-Since header set, the browser still must make a request to the server to check to make sure the resource has not changed. Generally with web applications, most resources such as JavaScript, CSS, and images will rarely (or never) change, and allowing the browser to cache these resources can greatly reduce the number of requests that a browser needs to make. This can be particularly important when accessing pages on high latency connections. For developers, clicking refresh on the browser will still cause the browser to request the most recent copy from the server even if it has the resource in cache.
The cache expiration time can be configured with the filter settings in your web.xml. The expiration-time parameter indicates how long resources should be kept in browser cache before expiring. This time is specified in milliseconds. The default expiration time is one day.