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 .
O'Reilly JavaScript Definitive Guide - page - 390
Wrox Instant JavaScript - page - 3
Prev | Home | Next |
J | Up | Java |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |