![]() | ||||
|
|
ptimizing for Internet Explorer 4
Microsoft Internet Explorer 4 has the ability to download and install Java class files on a client machine. This means that it is possible to automatically install the Ultimate Button Bar applet on a visitor's PC so that the browser does not need to download the applet each time that the site is visited (i.e., the applet is downloaded once, installed, then loaded from the hard drive each time that it is referenced thereafter). This documentation is divided into three sections:
| |||
|
| he CAB File
Included with the Ultimate Button Bar is a digitally signed CAB (CABinet) file named "UBB.cab." The CAB file is located in the IE4CABFile directory (the IE4CABFile directory is located in the Java directory). The CAB contains all of the Ultimate Button Bar Java class files, plus a special file that tells IE4 how to install the class files on the client machine. All of these files are compressed into a single package, then the file is digitally signed. When Internet Explorer 4 downloads a web page that contains a digitally signed CAB file, the browser will display a security dialog asking whether the component should be installed. The dialog displayed should be similar to the illustration below:
If the "Yes" button is clicked, then the browser will install the Ultimate Button Bar on the hard drive. From this point on, IE4 will not need to transfer the applet from the web site. Instead, the browser will load the installed copy of the applet from the hard drive, thus allowing faster loading of the web page on subsequent visits to the site. If the "No" button is clicked, then one of the following will occur depending upon how you have configured the applet:
| |||
|
| he OBJECT Tag
Internet Explorer 4 uses the <OBJECT> tag to install components stored in a CAB file on a user's system. There are a number of ways that the <OBJECT> tag can be used, but for the purposes of installing the Ultimate Button Bar, the simple approach descibed below is all that is needed. To enable the automatic installation of the Ultimate Button Bar on a user's system, the following tag should be inserted in the HTML before the APPLET tag:
For our purposes, two attributes must be specified for the <OBJECT> tag: CLASSID and CODEBASE. The CLASSID attribute is a special code that the browser uses to identify the Ultimate Button Bar. The browser uses the CLASSID to determine whether or not the Ultimate Button Bar is already installed on the system. The CLASSID attribute must match the following exactly (you may copy the CLASSID value below and paste it into the <OBJECT> tag in your HTML):
The CODEBASE attribute is a URL for the CAB file. If only the name of the CAB file is specified (i.e., CODEBASE="UBB.cab"), then the CAB file must be in the same directory as the HTML document. Optionally, the CODEBASE attribute can also identify the version of the Ultimate Button Bar so that the applet will be automatically updated if a newer version of the applet exists on the server. For example, the CODEBASE attribute:
will cause the Ultimate Button Bar to be downloaded only if the version of the applet on the user's system is earlier than version 2.0.0.1. It is recommended that you always include the version number with the CODEBASE attribute so that if the user's system has an older (or Shareware) version of the applet installed, it will be replaced with the most current version. | |||
|
| xamples
The <OBJECT> tag can be placed either inside of the <HEAD> section of the HTML, or inside of the <BODY> section of the HTML (before the <APPLET> tag). For the examples in this section, the version identified in the <OBJECT> tag is the registered Ultimate Button Bar 2.0 applet. For the Shareware version 2.0 of the applet, the version would be identified with a zero in the last position instead of a one (i.e., "2,0,0,0"). The following is an example of placing the <OBJECT> tag inside of the <HEAD>.
Alternately, the <OBJECT> tag can be placed in the HTML <BODY> section. If you use this method, place the <OBJECT> tag before the <APPLET> tag. The following is an example of placing the <OBJECT> tag inside of the <BODY>.
| |||
| Copyright © 1998 by Modern Minds, Inc. | ||||