Is there a way to delete older version of an applet from browser's cache? The things I have already tried to prevent the cache problem in first place are:
1- To set "no-cache" in HTTP response header, I placed following script on the top of my jsp:
<%
if (request.getProtocol().compareTo("HTTP/1.0") == 0) {
response.setHeader("Pragma", "no-cache");
} else if (request.getProtocol().compareTo("HTTP/1.1") == 0) {
response.setHeader("Cache-Control", "no-cache");
}
response.setDateHeader("Expires", 0);
%>
2- While deploying applet 'cache_option'
is set to 'no'
But of no use. I was now wondering if there is a way to programatically delete this applet jar file from cache?
[UPDATE]
Providing a unique url for applet each time doesn't look like a good idea in my case. As, in my case applet reloads(refresh) itself after a time (say at mid-night, using Timer), hitting on a url
applet.getAppletContext().showDocument(url);
It would be difficult to communicate new url to applet