.jar (File extension)

Java archive file.

JavaScript include files normally have a .js file extension. In some rare cases, a .jar file may be used. This is really a Java archive file type.

It contains a collection of .js files and is normally requested with the ARCHIVE tag attribute in the <SCRIPT> tag.

A .jar file is a ZIP compressed archive of the .js files with a small amount of additional information that carries a manifest. The web browser extracts the manifest so that it can then index the archive to retrieve the items it needs. You can make a simple archive like this with a zip compression utility (for example, Winzip). There is nothing special about it other than making sure the names are consistent with what you refer to from a script or HTML document.

Archives are also useful for attaching digital signatures to scripts. The web reference points to a Netscape resource on archiving, including a link to a downloadable Signtool Archive generator tool .

See also:<SCRIPT ARCHIVE="...">, File extensions, Security policy, Web browser

Cross-references:

O'Reilly JavaScript Definitive Guide - page - 390

Wrox Instant JavaScript - page - 3

Web-references:

http://developer.netscape.com/software/signedobj/