user534009
user534009

Reputation: 1479

java webstart no cache

How to avoid Java webstart not cache jar files ?

In development, I want to avoid cache in java webstart. In my lanuch.jnlp, if every time, I change the jar version number , it will force to download new jar, instead of using its cache ?

Thanks.

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

Upvotes: 3

Views: 2707

Answers (1)

aioobe
aioobe

Reputation: 421020

The Java Webstart will send an HTTP HEAD request to the server to get hold of the timestamp of all of the required .jar files. That is, you don't even need to update the version-numbers for Java Webstart to realize that the cache is outdated.

Quote from 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.

Upvotes: 3

Related Questions