问题描述
我需要退出 firefox 并重新启动它才能刷新小程序...它很烦人,因为我仍在对其进行编程并且类文件发生了变化...我是否遗漏了一些使其无法刷新的代码小程序,仍然从缓存中取出一个???
所以我在我的网站上有一个 .jar 小程序,一个模拟游戏,每当用户点击屏幕时就会产生军队......但是每当我刷新页面时,以前的军队仍然在屏幕上......我想要它刷新(就像我们第一次开始运行应用程序一样).
我已经试过按 CTRL+f5 但这个技巧似乎不起作用
我基本上想使用脚本或其他东西自动完成它,这样就不需要用户手动按下键盘上的某个按钮
有什么建议吗?
我真的很感激
谢谢....
您是否尝试过防止缓存?
编译指示:无缓存缓存控制:无缓存过期:-1I need to quit firefox and restart it in order for 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).
I already tried pressing CTRL+f5 but the trick doesn't seem to work
I'd basically like to do it automatically using scripts or something, so that it won't require user to manually press some button on the keyboard
Any Suggestions?
I'd really appreciate it
Thank you....
Have you tried to prevent caching?
Pragma:no-cache Cache-Control:no-cache Expires:-1
这篇关于在页面重新加载时重置 Java Applet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!