开发者

Reset Java Applet on Reload

I need to quit firefox and restart it in order fo开发者_如何学Pythonr the applet to be refreshed... its anoying since i'm still programming it an the class files changes... am i missing some codes which makes it unable to refresh the applet and still take the one from the cache???

So I have a .jar applet in my website, a simulation game that spawns army whenever user clicks on the screen... however whenever I refresh the page, the previous army are still there on the screen.. I want it to be refreshed (as if we're just starting to run the application the first time).

Any Suggestions?

I'd really appreciate it

Thank you....


Each time you build a new Jar applet add a build number to it, eg applet.jar?build=123 or build123/applet.jar. This is good practice for deployment too as it removes all cache concerns and this can probably be simply automated by your build solution eg Ant.

In addition it is worth considering using the separate_jvm tag, detailed here. Available since 1.6 update 10. It will ensure a new JVM each refresh which prevents you worrying about plug-in idiosyncrasies eg out of memory exceptions due to a lot of refreshes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜