我们在一个基于 Java-Applet 的 Web 应用程序中受到了性能影响。因此,我们实施了 JNLP 概念来改进小程序加载。
根据 JNLP,
JAR 文件将首次下载到客户端,并缓存在本地
如果服务器中的小程序版本与缓存中的小程序版本匹配,则不会下载小程序,而是从缓存中加载小程序
如果服务器端的 JAR 版本有任何变化,缓存中的旧 JAR 将被替换为新的 JAR
但是在我们的应用程序中,它没有按预期工作。我们发现 jnlp 文件本身来自缓存,因此它包含旧的 jar 版本。
每次关闭和打开浏览器时,有什么方法可以单独下载 jnlp 文件?或者有没有其他替代方法来解决这个问题?
任何帮助深表感谢!!
JNLP 文件
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="" href="" version="2.0.0.0">
<information>
<title>Active Viewer</title>
<vendor>Platts</vendor>
<offline-allowed/>
</information>
<resources>
<j2se version="1.6+"
href="http://java.sun.com/products/autodl/j2se"/>
<jar href="EWSApplet.jar" main="true" version="9.3.5.0" />
<property name="jnlp.versionEnabled" value="true"/>
</resources>
<applet-desc name="EWSApplet"
main-class="com.mycompany.ew.applet.EWS_Config.EWS_Config.class"
width="1"
height="1">
</applet-desc>
<update check="background" policy="always"/>
</jnlp>