I've noticed this menu uses up a considerable amount of bandwidth. I've been able to reduce the bandwidth usage quite a bit by renaming the menu files to filename.js.php and adding the following to the top of each file:
<? ob_start("ob_gzhandler"); header("Content-type: application/x-javascript"); ?>
This makes every script a PHP file. The code gzips the text before sending to the web browser, but only if the browser supports gzipped pages, which most do.
Still, after this compression the menu still uses up quite a bit of bandwidth. It would be nice if there were a "lite" version that had smaller file sizes.
menu bandwidth usage
You can compress the menu-data file, leaving no spaces. You can rename it menu-data.php, the thing that takes time is usually images not the menu, and those can be preloaded and are cached, and if the images are the same image used throughout then that helps cut down on loading images.
I find the menus quite fast loading, but then it may depend how complex you are building it. Older browsers don't handle js well will of course not be as fast, but modern browsers are faster.
maz
I find the menus quite fast loading, but then it may depend how complex you are building it. Older browsers don't handle js well will of course not be as fast, but modern browsers are faster.
maz
This question/complaint comes up from time to time and it's so easy to blame the menu for the increase in bandwidth but you've missed the real reason.
The menu files are quite small really and the vast majority of users will have caching switched on in their browsers so the files will only be downloaded once per user per visit, on average 50-60K per website, that's nothing is it?
Think about what you have done by installing a menu system on your website. You've increased your websites ability to serve its pages. Check your logs a little closer and you'll see that you are serving more pages than before (I'll put a bet on it) and this is why your bandwidth usage has increased it's nothing to do with the size of the menu.js files but more to do with the fact that your website is easier to navigate and people are using it more now.
In theory, the menu should be getting much praise for making your website better but alas, we only get complaints. It's Kind of a victim of its own success.
Cheers
Andy
The menu files are quite small really and the vast majority of users will have caching switched on in their browsers so the files will only be downloaded once per user per visit, on average 50-60K per website, that's nothing is it?
Think about what you have done by installing a menu system on your website. You've increased your websites ability to serve its pages. Check your logs a little closer and you'll see that you are serving more pages than before (I'll put a bet on it) and this is why your bandwidth usage has increased it's nothing to do with the size of the menu.js files but more to do with the fact that your website is easier to navigate and people are using it more now.
In theory, the menu should be getting much praise for making your website better but alas, we only get complaints. It's Kind of a victim of its own success.
Cheers
Andy
You know, making the js files into PHP files is probably forcing the browser to reload the script every time someone visits a page, defeating the purpose of compressing it. I bet if I added some cache control to the script, I could have the best of both worlds: fast loading and low bandwidth usage.
Thanks for the replies.
Thanks for the replies.
Mailman