caching of java applets

M

Mark_Galeck

Hello, some time ago I asked here why a foo.class file was cached by
browsers and so the foo.html file that references foo.class, is not
updated when I recompile foo.java. This made it difficult to debug
applets, since I see the cached version, not the last-recompiled
version. The advice I was given is not to display foo.html in
browser, for debugging purposes, but use other methods, such as
appletviewer. OK, that worked great.

But now, the question remains how to deploy an applet on my website.
If there is a bug and I substitute a newer version of foo.class on my
website, the browser still displays the old one, both IE 7 and
Firefox. Here's the foo.html code:

<OBJECT
codetype="application/java"
code=foo.class
width=100% height=100%
<PARAM NAME="cache_option" VALUE="No">

</OBJECT>


I tried to delete temporary files in IE and clear cache in Firefox, no
result, still old version of foo.class is displayed.


So, my question to you, is how do you deploy applets???, so that you
can update it and users see an updated version??


Thank you,

Mark
 
D

Daniel Pitts

Mark_Galeck said:
Hello, some time ago I asked here why a foo.class file was cached by
browsers and so the foo.html file that references foo.class, is not
updated when I recompile foo.java. This made it difficult to debug
applets, since I see the cached version, not the last-recompiled
version. The advice I was given is not to display foo.html in
browser, for debugging purposes, but use other methods, such as
appletviewer. OK, that worked great.

But now, the question remains how to deploy an applet on my website.
If there is a bug and I substitute a newer version of foo.class on my
website, the browser still displays the old one, both IE 7 and
Firefox. Here's the foo.html code:
If you package your applet in a jar, you can simply include a "version
number" in the jar name. This requires that you update your "foo.html",
but since it is a different jar name, the browser will always re-load it.

The better alternative is to use google to search for applet caching,
where you will find many resources to help you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top