Posted by maddentim on May 8, 2009 at 10:45pm
Jump to:
| Project: | SimpleMenu |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | AlexisWilke |
| Status: | closed (fixed) |
| Issue tags: | cache, JavaScript |
Issue Summary
I have used simplemenu on a site of mine and am pleased with the performance. One thing I have noticed is that for the first load, before the cache on the browser side is created, the menu comes up late in the load. I have read that the browsers load javascript serially instead of parallel as they do for CSS. In looking at Firebug, simplemenu seems to be one of the last to load when since it is a key part of the site presentation. We are only talking about a second here, but it bugs me. This might be something controlled at the drupal level instead of the module, but I thought I would start here.
Thanks
Comments
#1
I'm seeing a similar issue on my page. Since SimpleMenu loads last, it is rather jarring from a site presentation viewpoint to have it pop in after the page has just about finished loading. If there is any way to get it to load earlier, I'd love to know about it.
#2
I suppose we could at least have the menu spot ready for it. That way, it would not jump up and down, what do you think?
The reason for putting the menu at the bottom is technical and is described in many places (safer to put JS at the bottom of your pages.) But I would think that putting it at the top would not hurt unless the tag it needs to connect on is not yet loaded... Hmmm...
Thank you.
Alexis Wilke
#3
I understand the practice for js at the bottom and it seems like a good one. I am not sure what to say. I have not used simplemenu again since this one site. Most themes I use come with a simplemenu like menu built in like suckerfish... They don't have this problem either.
#4
Hi Maddentim,
Could you give us a link to one of those themes? Or are they not free?
That way I could see what they do and maybe implement it in this module.
Thank you.
Alexis
#5
sure, zero-point and pixture-reloaded both have drop down menus built in. You can find them in the official drupal theme pages.
#6
I'm actually thinking that the rather large JS generated by this module could be saved in a separate JS file since that should not change so much between pages (especially the Navigation menu.) Then we could load the simplemenu.js file and have the browser cache that too!
As for the location, I have no clue at this point, but such a feature could provide for smaller pages and one more cached file!
Thank you.
Alexis
#7
sounds like a solid approach to me....
#8
Okay, the next -dev will include the cache capability talked about here: i.e. the JS representing the menu is saved in a .js file referenced either in the header or the footer!
However, that does not eliminate the delay per se. It will mitigate it, but it will depend on the order in which the JS is executed.
Otherwise, you may want to check out the Nice Menus module which may be more appropriate for a public menu than Simplemenu is.
Thank you.
Alexis
#9
Automatically closed -- issue fixed for 2 weeks with no activity.