wood burning stoves 2.0*
The moose likes Applets and the fly likes Can Java Applets be stored on the client? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Can Java Applets be stored on the client?" Watch "Can Java Applets be stored on the client?" New topic
Author

Can Java Applets be stored on the client?

Samuel Quiring
Greenhorn

Joined: Feb 04, 2009
Posts: 8
I am weighing using an ActiveX control vs. a Java Applet for my web page. One factor is download time. If I install an ActiveX control on the client's PC, then it is there and won't need to be downloaded again. It looks to me like a Java Applet will be downloaded every time the user visits my web page. Is that correct? Will the browser cache the applet and only redownload it if it has changed?

Thanks
-Sam
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
The jar files that make up an applet will be cached by the browser. The user has the option of turning this off (in the Java Plugin control panel) but caching is on by default, and most users probably never venture into that control panel to change things.

The browser just checks if the date of the jar file has changed; if it hasn't, then it's not downloaded again.


Ping & DNS - my free Android networking tools app
Samuel Quiring
Greenhorn

Joined: Feb 04, 2009
Posts: 8
Thanks for the answer. Since you did not mention it, I take it there is no way to install an applet on the client machine, so even if the user had browser caching turned off, the browser would find and use the installed applet.

-Sam
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
Correct.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Samuel Quiring wrote:Thanks for the answer. Since you did not mention it, I take it there is no way to install an applet on the client machine, so even if the user had browser caching turned off, the browser would find and use the installed applet.

-Sam


You might want to look into "Java Web Start", which exists to solve the problems you describe.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Can Java Applets be stored on the client?