| Java menu knowledge base Index compression
Compressed content delivery: using compressed ZIP files for index files
The index will probably be the largest single file in an applet implementation.
Using ZIP compression, a typical index file can be cut by about 85% to 90% in
size - which means the resulting file will be only 1/9th or 1/10th of its
original size. Particularly with larger files, this can cut download time
hugely.
Most imint.com applets have two methods of loading indices: (1) external
files; (2) parameters. For obvious reasons, you can't ZIP compress parameters.
This only works with external files.
ZIP-compression is not yet implemented on all of our applets - check the
features and version histories, and ask us if you can't find it listed.
To implement ZIP compression:
- ZIP up your index file into a ZIP file using a standard zipper utility such
as winzip.
- The ZIP file should have only one file in it - the index file. Nothing else.
- Upload the ZIP file to your server, putting it in the same directory as the
applet.
- Tell the applet to look for the ZIP file as its index source. With most imint.com
applets, you use the "menufile" parameter for this. e.g.
<PARAM NAME=menufile VALUE=menu.zip>
- Tell the applet that the menu content is compressed - usually done with
the menusourcetype parameter (or something similar - check the parameter list for the applet you are using). If you forget to do this, you will typically end up with
a blank, empty menu.
Dynamic compressed indices
If you are dynamically generating an index using a server-side programme
to construct an index on the basis of a database subset, your server-side
scripting language may possess modules for ZIP compression.
- Java-based server-side programming has easily usable ZIP compression
modules.
- If you are using .NET or other Microsoft server technologies, a customer
of ours has reported an open source library from which he was successfully
able to construct a dynamic zipped index generator for imint.com applets.
- PHP can handle dynamically generated ZIP files - we can supply you
with additional help in this area.
|
|