These examples show how you can optimize the download time for specific browsers by using their smallest Java archive. In general, the smallest archive is Microsoft's CAB format, followed by the compressed JAR file. The ZIP file is the largest since it is not compressed. For the best all-around browser support, we recommend using both the JAR archive and the CAB archive in your applet tag, shown by the last example on this page.
The applet below is loaded from its Java class files by all Java Compatible browsers:
<applet codebase=".."
code="COM.volano.MyVolanoChat.class" width="500" height="100">
<param name="color" value="#ffffff">
</applet>
The applet below is loaded from its Java ZIP archive when using Netscape Communicator or Netscape Navigator 3.0 or later. Microsoft Internet Explorer and Netscape Navigator 2.0 load the individual Java class files.
<applet codebase=".." archive="COM/volano/MyVolanoChat.zip"
code="COM.volano.MyVolanoChat.class" width="500" height="100">
<param name="color" value="#ffffff">
</applet>
The applet below is loaded from its Java CAB archive when using Microsoft Internet Explorer 3.0 or later. Netscape Navigator and Netscape Communicator load the individual Java class files.
<applet codebase=".."
code="COM.volano.MyVolanoChat.class" width="500" height="100">
<param name="cabbase" value="COM/volano/MyVolanoChat.cab">
<param name="color" value="#ffffff">
</applet>
The applet below is loaded from its Java JAR archive when using Netscape Communicator, Netscape Navigator 4.0 or later, or Microsoft Internet Explorer 4.0 or later. Netscape Navigator 2.0 and 3.0, and Microsoft Internet Explorer 3.0 load the individual Java class files.
<applet codebase=".." archive="COM/volano/MyVolanoChat.jar"
code="COM.volano.MyVolanoChat.class" width="500" height="100">
<param name="color" value="#ffffff">
</applet>
The applet below is loaded from its Java JAR archive when using Netscape Communicator 4.0 or later. The applet is loaded from its CAB archive when using Microsoft Internet Explorer 3.0 or later. Netscape Navigator 2.0 and 3.0 load the individual Java class files.
<applet codebase=".." archive="COM/volano/MyVolanoChat.jar"
code="COM.volano.MyVolanoChat.class" width="500" height="100">
<param name="cabbase" value="COM/volano/MyVolanoChat.cab">
<param name="color" value="#ffffff">
</applet>