Java WebStart没有缓存

如何避免Java Webstart不缓存jar文件?

在开发中,我想避免在Java Webstart中缓存.在我的lanuch.jnlp中,如果每次都更改jar版本号,它将强制下载新的jar,而不是使用其缓存?

谢谢.

<jar href="myjar1.jar" main="true" version="031720111507"/>
<jar href="myjar2.jar"  version="031720111507"/>

解决方法:

Java Webstart将向服务器发送HTTP HEAD请求,以获取所有必需的.jar文件的时间戳.也就是说,您甚至不需要更新Java Webstart的版本号即可了解缓存已过时.

引用here

(Using basic protocol) Web Start sends out an HTTP HEAD request for every jar in your app’s XML startup file to check the timestamps of the latest and greatest jars stored on the server against the jars stored in your Web Start cache. Thus, breaking your app into more jars results in more HTTP HEAD requests and may slow down the initial update check.

上一篇:为Java Webstart启用https


下一篇:java-JNLP下载期间FileNotFoundException