Results 1 to 9 of 9

Thread: HTML META REFRESH versus Applet class REFRESH?

  1. #1
    VirtuallyVB
    Guest

    Question 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?

  2. #2
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367

    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.

  3. #3
    VirtuallyVB
    Guest

    Thumbs down

    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.

  4. #4
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    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.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  5. #5
    VirtuallyVB
    Guest
    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?

  6. #6
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    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.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  7. #7
    VirtuallyVB
    Guest
    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.

  8. #8
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    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.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  9. #9
    VirtuallyVB
    Guest
    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
  •  



Click Here to Expand Forum to Full Width