PDA

View Full Version : Is there a way to speed up the page loading time



artistcsi
09-14-2010, 06:06 PM
Script: Drill Down Menu (v1.6)

http://www.dynamicdrive.com/dynamicindex1/drilldownmenu.htm

Issue: I have a site using the Network Solutions eccommerce system. I don't know if this is the issue, but their system is modular where you have a top, left and right and a bottom module. The actual content for the pages goes in the middle module, this is where the Drill Down Menu (v1.6) script functions.

The scripts works wonderfully, love it! But the page loads sooooo slow, I know that people would abandon it before they even try to see the info and go through the script.

I mentioned the Networks Solutions set up because I don't know if this has something to do with it or if there is to much content to load.

Here is the link: http://www.traxxion.com/forks-seals-bushings-drivers.aspx
your assistance and expertise is appreciated very much.

Any suggestions???

ddadmin
09-15-2010, 03:11 AM
The size of your UL might simply be getting a little too large for the script to handle effortlessly. For the time being, one way to mitigate the page from stalling is to use the Ajax option of the script to load the UL from an external file instead (see here (http://www.dynamicdrive.com/dynamicindex1/drilldownmenu_suppliment.htm)). The way Ajax works is asynchronously, so at least it will not stall the loading of the page initially as it works in the background to load the menu contents.

A couple of other things you should do:

1) Remove the code in red inside your HTML page:


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<link rel="stylesheet" type="text/css" href="drilldownmenu.css" />

<script type="text/javascript" src="drilldownmenu.js">

/***********************************************
* Drill Down Menu script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>

It's redundant, as you already have a jQuery reference further up the page.

2) Secondly, for the remaining jQuery reference on your page:


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script type="text/javascript" src="ddaccordion.js">

/***********************************************
* Accordion Content script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

</script>


Change the code in red to the below instead, which is the latest version of jQuery, and does contain some speed improvements:


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

artistcsi
09-15-2010, 05:54 PM
Thank you!!! I knew there had to be a way.:)

Yes, that did speed things up, but I was wondering also, since the html part is so large, would it help if I split it up into say 3 files? then the user could access 1 section at a time?

ddadmin
09-15-2010, 08:15 PM
Yes, that did speed things up, but I was wondering also, since the html part is so large, would it help if I split it up into say 3 files? then the user could access 1 section at a time?

Splitting the menu contents into multiple files would be the best way, though unfortunately at the moment, the script doesn't support it (it will take quite a bit of modifying the script to do so). It's called lazy loading, and I may add such a feature in the next time the script is updated if there is enough demand for it...

artistcsi
09-16-2010, 03:22 PM
Thanks for the input. I am going to split it, but please let me know if you add that feature in the future.