What’s difference between cache & permanently cache in browser.
In GWT framework image files rename to .cache. pattern and I read somewhere in google website to cache permanently images in GWT configure the App-Server for caching them permanently.
But I don’t know how to do this exactly.
My website’s images will never changed and I want to cache them forever without any version checking (for best performance)
Yours sincerely
What’s difference between cache & permanently cache in browser. In GWT framework image files
Share
ClientBundleintroduced in GWT 2.0 allows you to bundle images and other resources in one file, this file is cached forever resulting in fewer server request.That being said, GWT introduces a concept they call perfect caching. It works by splitting your application in several files named something like .cache.html and the md5 part always change when your application code or resources change. Then there’s the bootstrap script, which contains the logic to look for the correct
<md5>.cache.htmlfile and load it. The bootstrap should never be cached.In your app server, you need to configure it something like this (Apache in this case)
In this case it’s set to cache for one year. As far as I know there’s no setting to cache forever, that only means a very high expiration time.
Tomcat caching
In the case of Tomcat, as far as I know there’s no cache control so it has to be done manually by setting the proper HTTP headers. This can be automated by the use of filters.
Then map the filter in tomcat or derivatives (such as glassfish), in web.xml: