Page 1 of 1

Do you think my menu is loading slower than it should?

Posted: Mon Jul 03, 2006 8:56 pm
by bpj553
Hi Norman,

I have been running your script for a few months now, but can't make up my mind if it is loading fast enough. Some broadband customers say it is frustratingly slow. It does always seem to be the last to load on a page.

Would you be kind enough to give me your opinion on whether my menu is 'normal', or if there might be a way of speeding it up.

Many thanks.

Posted: Tue Jul 04, 2006 9:21 am
by norman
You have slightly misplaced this lump of code in Act_Primary.html

Code: Select all

<!-- START NorCascade Act_Brochure_Primary.html patch -->
<!-- END NorCascade Act_Brochure_Primary.html patch -->

It should normally be after the <BODY .....> tag (or before the </BODY> if you are using a named target - I think you are), but you've put it after the </BODY> one.

In addition your the Actinic generated section tree Name and URL files are 52Kb and 100Kb respectively.

Posted: Tue Jul 04, 2006 9:43 am
by norman
Another thought. You could try moving the lines


from their current place to just before the </HEAD> tag in your Primary Templates. This will cause these to load earlier rather than at the very end.

Posted: Thu Jul 06, 2006 9:34 pm
by bpj553
Thanks Norman, i'll have a play.

Posted: Tue Jul 11, 2006 8:48 pm
by bpj553
Bit of an odd one this... I moved the script so it is within the body area, and it does seem to load faster. Great.

But on load, the menu sticks in the top left hand corner of the screen, as if it isn't picking up the anchor point. But if you scroll the screen, it pops back to the correct position.

I put everything back to how it was, but saved one page for you to see.

Press REFRESH on explorer and it shoots to the top left. Scroll the screen and it pops back to the correct poition. Weird, huh? Seems ok on firefox, though it go to the corner the first time. After that it was ok.

What do you think?

Posted: Wed Jul 12, 2006 7:42 am
by norman
This is happening because the JavaScript that builds the menu is higher up in the HTML than the named anchor <a id="home" name="home"> that you are positioning the menu against.

If you want to lock the menu to an anchor than the code needs to come later in the page, so it can find that items definition.

The usual suggestion here is to move the code to just above the </body> tag.

If you relocate the code to there, this means that the menu files load and the menu builds last.

However you can move the 2 lines that load the Actinic section tree into the HEAD area (just before </head>) and that will cause these to load early and may give a faster response.

Posted: Wed Jul 12, 2006 7:29 pm
by bpj553
Thanks again! :D