Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0-M3
-
None
-
Linux, Sun JDK-1.5.0, Tomcat 5.0.30
Description
The files comprising Velocity templates (especially images) are prevented from being cached in proxies and end user browsers, which creates significant bandwidth/resources waste.
This is because the ContentServer doesn't provide any cache control headers (Expires, Last-Modified, Cache-Control) and doesn't react to client's cache related headers (If-Modified-Since).
When serving ordinary files from Velocity template directories, ContentServer has access to necessary data - notably file modification timestamps, so it could generate proper cache control headers.
An example site with its performance suffering because of this: http://kwiaty.altkom.pl:8880/jetspeed/ (notice that the images load with each page view, again and again, instead of being cached on client side).
There's an excellent tutorial on HTTP caching techniques here: http://www.mnot.net/cache_docs/