Hi,
my app has a background image which is attached to the main panel with the
CSS attribute background-image. I would like to avoid unecessary loading
of this image by having it cached in the browsers for a long time.
I know methods for the apache web server, e. g. mod_expires. But my app
If you can, use a ClientBundle. That will ensure the background image only
gets downloaded once with the rest of your image resources and the
spritemap produced by the client bundle should be cached by the browsers.
create an interface called AppImages that extends ClientBundle (class must
be
You can set the cache headers from Tomcat using a filter like this
examplehttp://stackoverflow.com/questions/2872613/caching-images-served-by-servlet
.
Or, you can also set it up in Tomcat7 with the Expiration