我测试Java Applet和当我改变了代码,保存它(我使用NetBeans 7.0.1,并有“上自动编译保存”选项勾选上),并刷新Applet的犯规重载它的源代码页面,小程序不会读取其新代码,但仍会从缓存(或从任何地方)加载旧代码。 我试过Shift + F5和Ctrl + F5没有结果。更好的主意,然后关闭并打开整个浏览器? (问题Chrome和Firefox保持)当页面刷新
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title>Applet 1</title>
</head>
<body>
<applet code="test/EasyApplet.class" width=400 height=300>
</applet>
<br>
<applet code="test/MyApplet.class" width=400 height=300>
</applet>
</body>
</html>
小程序:
package test;
import java.awt.*;
import java.applet.Applet;
public class EasyApplet extends Applet {
public void init() {
add(new Label("and this is even more strange text 13"));
}
}
无缓存清理帮助,但后来清爽约一分钟后,新的小程序重新加载。
你的html看起来像什么?如果手动清除浏览器的缓存会发生什么? – DagR