How can I make the browser of a client load the new version of the html page with a new java applet?
We updated a system in the field, but when the client connected to the web server, the old java applet was still shown (from the cache).
How can I force (preferably from the server side) the client to load the new version instead of the one from it's cache?
Old system (before upgrade) :
New system (after upgrade) :
The user is using Chrome on a Windows XP machine
When the user loaded the page in Firefox, the new java applet was shown and working flawlessly. (He never loaded the old java applet in firefox)
[EDIT]
adding the lines from looper to my httpd.conf did not lead to any errors, but i am not sure if it works either ...
i don't seem to be able to reproduce the caching problem of my client : when i change something the in the applet and load it again from another computer, then nothing changes, but when i reload a few minutes later, it does show the new version .. without or without those extra lines with CacheDisable
when i search my httpd.conf for "cache" then all i find is :
#LoadModule cache_module modules/mod_cache.so
#LoadModule disk_cache_module modules/mod_disk_cache.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule mem_cache_module modules/mod_mem_cache.so
so it seems no caching is enabled ?
when i add the line with CacheDisable by itself (without IfModule), then Apache doesn't want to start, so it probably corrupts httpd.conf ?
[EDIT2]
as the server OS, web server, java class names, and all filenames except index.html are different from the old version, it must be the cached index.html which is the cause of the problem. I added the meta tags from FrancescoMM's answer to my index.html, and hope this will prevent the problem for future releases
If the java classes are different, then the index file is the one that is in cache. It could also be the client proxy cache, so acting on the server has no result.
The fastest solution is to send a new url to the client:
http://www.site.com/index.html?random_param=1234
http://www.site.com/?random=1234
http://www.site.com/?1234
http://www.site.com/?new
or even just
http://www.site.com/?
should be enough.
EDIT
Also, have you tried adding all the pragma no cache and expiration date meta tags to the HTML page? That should tell the client proxy to reload the page anyway.
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="Mon, 22 Jul 2002 11:12:01 GMT">
Note that EXPIRES is set to an old date on purpose. This may not solve your problem this time, as if the new index is not loaded, nobody (server, proxy, client) will see the new tags, but will make sure the next time the page is loaded every time.