views:

147

answers:

2

Does a JavaFX applet use the browser's cache or any cache when downloading files over http://? I know it will cache the .jar files that define the application. I want to write an audio player that caches the media it downloads.

+1  A: 

AFAIK the JavaFX runtime will cache the JARs used for the applet. It will not use the browser cache, though.

Eric Wendelin
I suspected as much. I guess the right thing to do would be to implement my own cache using the jnlp local storage facility?
joeforker
Yeah I have had good experiences with that. There is a 512K limit or something, though just FYI.
Eric Wendelin
Sometimes Java makes me sad. HTTP with a cache! How hard should that be, Sun? Sun: HARD! But I'm pretty sure the application can try to allocate more local storage and the user will get a dialog asking whether the additional cache is ok.
joeforker
A: 

The latest version of the Java plugin (jdk1.6.0u10+) actually uses JavaWebStart, so the actuall JVM is not within the Browser's space at all. All files are cached in their own area based on JavaWebStart configuration.

JimClarke
I know the applet's .jar files are cached. I'm trying to cache the user's web service downloads.
joeforker