Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:43
File size of .js files
Poster: paulvgibbs
Dated: Monday September 16 2002 - 17:13:31 BST
I am a little concerned with the file size of the .js files and wondered, if I am only using certain features of the menu, whether I could delete those functions to have a 'cut down' version. The problem though is that I don't know which bits to cut out.
I would be interested to hear of any views on the file size of the menu system and if it is possible to reduce it.
Poster: John
Dated: Monday September 16 2002 - 18:33:19 BST
Paul, I don't see any problem with the size of the menu (especially given everything it does). I'm showing about 31K which I think is reasonable, and I haven't had a single complaint about load times. The array size, of course, will vary depending on the size of your menus. Not to mention it's more than 10K smaller than another DHTML menu program
As for cutting it down - I wouldn't. You'll break it for sure . Andy has the code packed so tightly I don't think there's any way to get anything out, anyway. [Jeez - that's a brilliant sentence... ]
Poster: kevin3442
Dated: Monday September 16 2002 - 22:25:27 BST
Paul,
I agree with John. It's not advisable to try to edit anything in the mmenu.js file. Not only would you probably break it, as John said, but you'd have to cut the same bits out each time you get an update. Not worth the time. When you try it, you''ll notice that the menus actually load very quickly, even on a dial-up.
Kevin
Poster: menufurfer
Dated: Thursday September 19 2002 - 1:38:21 BST
On dialup I find the loading time is noticeable when the file(s) are not in the cache. I'm not sure but I would imagine the js files also go into the browser cache along with html files, so the initial load might take a few extra seconds.
I'm glad Paul brought up the question. I have been putting off taking out the comments in my online version and have just trimmed them out. Granted it's likely a miniscule saving but the principle is that online code should be as tight as possible.
I had sprung for the code editor UltraEdit-32 recommended by Andy and it proved its value just in erasing the comments with a single key combo.
I assume everyone has erased the explanation header code up top. That should save a bit as well. /mfurf