Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:13

Slow menu - don't know why


Poster: Jonas
Dated: Friday August 27 2004 - 11:02:31 BST

The menu can be seen here and is slow (and sometimes does not appear): http://www.arcadesreseau.be/index.php

Mind the index.php, the index.html is a static temporary placeholder.

The menu data is build using php and the data file can be accessed on this url: http://www.arcadesreseau.be/index.php?menu=1

As you can see, the menu is not very big at all. I am using IE6 at the moment and maybe it is because I have some previous version (development version on my machine) cached or something, no clue.

Customer has not complained yet but I suspect that will not last very long...

Any hints on this case for speed improvements (I have to do a reload on most of the pages to let the menu show up anyhow).

Help would be appreciated - thanks
jonas

PS menu version is 5.44 - and empying the cache does not help


Poster: Andy
Dated: Friday August 27 2004 - 12:10:04 BST

Hi,

There are some very weird things happening on your website.

I think it might be because you've named the menu index.php and the default page is also index.php.

When the menu fails to appear and I do a "View Source", I get the menu data file come up. If I refresh the page so the menu works, I get the source for the page. I'm guessing there is a conflict somewhere that the browser is getting confused by, possibly because of the file name matching.

This only happens with Internet Explorer, all other browsers seem to be fine. I'm guessing it's a bug with the browser but can't say for sure.

Can you not rename the menu_data file to something other than index.php? - Don't forget that the web server could be sending bad headers because the filename matches the servers Default page setting. I've never seen this before, it's very odd.

Cheers
Andy

You are probably right


Poster: Jonas
Dated: Friday August 27 2004 - 12:58:28 BST

I guess you are right about the naming conflict. I will put the php code for the data in a separate file and test it later on the production server. On my own machine I never experienced the problem.

I will also post a followup.


thanks for your reply,
jonas

Solved


Poster: Jonas
Dated: Friday August 27 2004 - 14:35:58 BST

putting the menu data in a separate .php file does seem to correct the weird behaviour.

thanks again
jonas


Poster: perldev
Dated: Friday August 27 2004 - 14:49:27 BST

It's a cache issue. You may put an alert in your data file. When you visit the cached one, the alert won't show up, i.e. the data js won't be called.

How do I do that?


Poster: Jonas
Dated: Friday August 27 2004 - 14:52:09 BST

And how can I put an alert in the data file so it will not show up?


Poster: perldev
Dated: Friday August 27 2004 - 17:32:51 BST

I didn't say it clear, sorry. In menu_data.js, add alert("In menu_data.js"); If the alert shows up, the menu should be printed. Otherwise the data js will not be invoked.

Fixed it...


Poster: Jonas
Dated: Monday August 30 2004 - 7:03:27 BST

In the menu.php file (which retrieves the menu data separate from the main index.php script) I had some ob_start() and other outbut buffering commands combined that seemed to F*k up the output in a way the IE JS interpreter does not like it. I cleaned up the menu.php file, did everything straightforward and now I am under the impression (knock wood) that the menu works fine as it should be...

Andy and perldev, thanks for your feedback. I am just adding this reply to make sure someone else would not make the same mistakes.

thx
jonas

PS just an extra: I also removed all the whitespace from the menu.php script..