Force Get object to refresh content
I'm using Jamie's Get object in a Standalone Java Internet Applet. It works great but there's a problem: The Get object does not recognize if there's a change in the source file (refreshing the page does not work), so I have to restart the browser the see the changes.
Is there a way to force the Get object to reload the source page content?
Thanks. :)
Re: Force Get object to refresh content
I would assume it's caching it because your webserver is telling it that it can...
Re: Force Get object to refresh content
Thank you Dynasoft for your answer! I've found the problem: there's a cache folder on my Mac that stores temporary files for fast access. I have to delete the stored file.
Re: Force Get object to refresh content
Does the Standalone Java Internet Applet have access to the cache folder to delete the stored temporary files? Just because this problem can appear on Windows, too. There's the page that explains how to clear cache:
http://java.com/en/download/help/plugin_cache.xml
But I think it isn't very elegant way to tell the users that "Please clear the Java cache if you want to see the effect of your changes". There should be a solution for this. Any ideas?
Thanks. :)
Re: Force Get object to refresh content
I'll see if there's any way I can persuade Java to bypass the cache when I write the updated Get object's Java version.
Re: Force Get object to refresh content
Wow, that's very kind of you, Jamie! Thank you very much!
Re: Force Get object to refresh content
Quote:
Originally Posted by Czentnar
But I think it isn't very elegant way to tell the users that "Please clear the Java cache if you want to see the effect of your changes". There should be a solution for this. Any ideas?
You should be able to configure your webserver to change the cache time of any file on it (or disable caching for your file).
If the file is dynamic (e.g. php) it should be set to not cache by default, but you can send headers back manually from PHP to control cache time.
Re: Force Get object to refresh content
Thanks, Dynasoft, but I think these files are stored in Java's own cache folder and users can disable caching in the Java preferences. So this cache is not the same as the browser's cache.
Re: Force Get object to refresh content
They are still retrieved by HTTP Get, and so should still be obeying the same caching rules.
Re: Force Get object to refresh content
Oh, I understand now!
To be honest, this application will run on other servers too. So I'm not sure that all of my customers will be able to change their server rules.
We'll see what Jamie can do with the Get object. :)
Thanks!