File size of .js files

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
paulvgibbs
Beginner
Beginner
Posts: 9
Joined: Mon Sep 09, 2002 10:09 am

File size of .js files

Post by paulvgibbs »

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.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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 :D . 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... :!: ]
Last edited by John on Mon Sep 16, 2002 11:10 pm, edited 1 time in total.
John
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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
menufurfer
Super Advanced
Super Advanced
Posts: 37
Joined: Sun Jul 28, 2002 4:40 am

Post by menufurfer »

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
Post Reply