How can I clear the cache in gwt?
or is there any way that prevent browser to keep the cache in gwt?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you deploy a GWT-application it’s important to avoid proxies and browsers to cache the .nocache.js-files generated by GWT. One solution is to implement a servlet filter that adds the necessary HTTP-headers that control the caching behaviour.
Here’s such a filter: http://seewah.blogspot.com/2009/02/gwt-tips-2-nocachejs-getting-cached-in.html
The headers in that example are:
Dateshould be set to the time of the request.Expiresis best set to sometime in the past, this forces everyone to consider the content already stale.Pragmais a tag that has been superseded byCache-Control, but it doesn’t hurt to have it.Cache-Controlno-cachemeans a browser or proxy must revalidate a cached copy before releasing it to the client.no-storemeans no one is ever keeping a cached copy (which makesno-cacheredundant).must-revalidatesays the browser/proxy must obey freshness information and revalidate, also redundant withno-store.