I'm currently developing a site, www.55057.com/stolaf/
, that has hierarchical menu’s. I am using the code available from http://www.webreference.com/dhtml/
. The script works very well, except that it is slow.
Main WebPage: 33Kb
Java HM_Array.JS – menu file – currently 9kb, was 14kb (see below)
Browser determined files: about 30 KB total
Current Problem: Internet Explorer locks-up / freezes for 3-5 seconds while it ‘compiles’ the menu’s. The Menu’s are created by default on page load. (netscape does not have this problem)
One way in which I have tried to speed up the load was to try and shrink the size of the HM_Array.JS file, which is what has all of the menu item code.
One technique I used was to truncate the URL’s. One question is whether or not shrinking the size of the JS file offsets (to 9Kb from 14Kb), the additional time taken to compile the links. Ie:
*about 50 other links
So every time the page loads the java interpreter has to add in the http://www.
Another Option is to compress the Menu’s. Currently there are 4 menu’s. Would condensing these down to one main Menu increase the speed? (So instead of having my GIF images, I would replace it w/ a permanent first level layer/list of options)
Does anyone have any suggestions for other Hierarchical Menu systems? Or should I consider something else like VBScript etc? MSNBC.com
has a menu system that Uses ActiveX for IE, but is Java based for Netscape, and it is really fast w/ lots of menu-items (their text document that runs it is 60K!) – Does anyone know where to find code to do something similar to MSNBC?
Thanks For you your help.