|
-
May 27th, 2002, 02:29 PM
#1
HTML META REFRESH versus Applet class REFRESH?
I'm programming an applet and testing it with IE 5.5.
I have Tools | Internet Options... | General (tab); Temporary Internet files | Settings... | Check for newer versions of stored pages: Every visit to the page selected;
and I even Delete Files...
Tools | Internet Options... | General (tab); Temporary Internet files | Delete Files... (but not all offline content).
I even set an html refresh meta tag (which I suppose only automates the refresh button)
Do I have to do something special to make sure I reload the newest applet class file?
-
May 31st, 2002, 08:32 AM
#2
Hyperactive Member
Yes you do
Hey Virt,
when you hit shift+f5, it will force the java applet to totally reload. And you will not need need to keep clearing your cache.
-
May 31st, 2002, 02:50 PM
#3
Someone else said the same thing, but I've had no luck.
Win98 IE 5.0 and IE 5.5 (just upgraded today) don't work with the shift combo. WinME and IE 5.5 doesn't work either with the shift combo.
F5 alone still has the caching issue. You'd think that selecting "Check for newer versions of stored pages: Every visit to the page" would solve this.
The only thing I'm aware of that I did to both machines was upgrade to DirectX8.1 from the internet.
The applet class name is the same, but the contents has changed. Netscape6.2 and IE5.0, 5.5 won't load the new applet class file.
Also, what happened to Refresh on Netscape? Netscape used to have Reload and Refresh. One of them actually got all the new data from the page.
There is nothing like taking steps backwards when we upgrade.
-
Jun 3rd, 2002, 03:00 AM
#4
Well ...
Does closing the IE window and reopening it and then reloading the page solve the problem? If so, it must be that the Refresh does not load a new instance of the applet, as it's already there in the JVM of the browser.
.
-
Jun 3rd, 2002, 04:09 PM
#5
Does closing the IE window and reopening it and then reloading the page solve the problem? If so, it must be that the Refresh does not load a new instance of the applet, as it's already there in the JVM of the browser.
Yes, I get the new applet class if I close IE and reopen that page. Is there a way to refresh/reload/update to the new class file without shutting down IE?
-
Jun 4th, 2002, 03:30 AM
#6
Well ...
Originally posted by VirtuallyVB
Yes, I get the new applet class if I close IE and reopen that page. Is there a way to refresh/reload/update to the new class file without shutting down IE?
In that case, I doubt if it can be done by simply refreshing the browser.
You can try one more experiment: Open two IE windows, and load the same page and same applet in both. Then change the applet code and deploy the new applet on the webserver. Then close only one of the two windows and reopen it, and then refresh the other window. See if the new applet is loaded in both the windows. Also repeat this exercise by changing the name of the applet .Class file.
I think the JVM plays a part in this process, and refreshing the browser does not instruct the JVM to reload the class.
.
-
Jun 4th, 2002, 11:32 AM
#7
Only a new IE instance (obtained by starting up IE from a shortcut or actual exe) loads the newest applet class file.
A new window (obtained by Ctrl+N or File | New | Window), which corresponds to an existing IE instance, does not load the newest applet class file.
I agree that there are different JVM's for different instances (I thought different windows had their own too, but apparently not).
Any idea how to instruct the JVM to reload the class? Or to get a new JVM for an IE instance or window?
Take care to note how I am defining window and instance.
-
Jun 10th, 2002, 02:31 AM
#8
Well ...
There is one option you can try, however, I am afraid it will be heavy on performance and resource usage. Also I do not know whether it will be permitted by the Java SecurityManager.
You can use a bootstrapper or an initializing applet in the HTML page which the browser loads. In the Start event of the applet, you can write code to dynamically load your main applet class and then call its init() and start() methods as appropriate.
Whenever the browser is refreshed, the start() method of your initializer/bootstrapper applet will be invoked, and it will load the main applet anew, whether changed or not.
However, if the browser window loses and then regains focus, the start() event will be fired, and the main applet class will be reloaded, thus compromising the performance. However this might ensure that the newest available applet class is loaded. Also this is possible only if an applet can dynamically load another class into the client's memory.
.
-
Jun 13th, 2002, 03:36 PM
#9
Thanks honeybee.
It was more of a peeve than a real requirement. I suppose best coding practices is to use appletviewer until you want to deploy.
I didn't test your idea, but I would assume that if/since caching is involved per VM instance, then unless there is a VM.clearCache() thingy, wouldn't it just load the cached class anyway?
You don't have to waste your time on this question anymore.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|