1.6 Web Start will make a redundant download request for some jars
Using a network-traffic-sniffing tool, I noticed that one of my jar files was being downloaded redundantly when using JRE 1.6. When investigating the issue, I found that the SwingSet demo on Sun's Web Start demo page (http://java.sun.com/products/javawebstart/demos.html) exhibits the same behavior (the other demos do not). The following examples are from a download of the SwingSet demo.
The first jar request looks normal:
GET /products/javawebstart/apps/swingset2.jar HTTP/1.1
content-type: application/x-java-archive
accept-encoding: pack200-gzip,gzip
User-Agent: JNLP/6.0 javaws/1.6.0_01 (b06) Java/1.6.0_01
UA-Java-Version: 1.6.0_01
Host: java.sun.com
Cache-Control: no-cache
Pragma: no-cache
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Proxy-Connection: keep-alive
If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT
After this request completes, the jar is downloaded as expected and the SwingSet window opens; although some of the images in the tool bar do not appear. At this point, a second request for the same jar is made.
GET /products/javawebstart/apps/swingset2.jar HTTP/1.1
User-Agent: Java/1.6.0_01
Host: java.sun.com
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Proxy-Connection: keep-alive
Obviously it has less header fields, and also it is interesting that the User-Agent appears to be the Java application itself rather than Web Start. Note that this is a GET request and it does not have an If-Modified-Since field, so the entire jar will be downloaded again even though it was cached after the first request.
After this request completes, the rest of the toolbar in the SwingSet window is filled in. Perhaps this additional request is somehow resource related?
This behavior does not occur in previous JREs, only in 1.6. Also, it does not occur with all jar files; the other demos on the Sun site do not exhibit this behavior.
The jar file in my application is quite large, so I would like to prevent this redundant jar download if possible. Do you know why this is occurring? Is there a way that I can structure my jar differently in order to prevent this from happening?
Thank you.

