Announcement

Collapse
No announcement yet.

Act_section_tree.js

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Act_section_tree.js

    hi after uploading my site and running tests its very slow ive spoken to my server hosts and they said this

    "avascript size:
    Upon analysing the website we can see that there is a javascript file (Act_section_tree.js) which is over 10Mb in size. This means that every new viewer to the website will have to wait until over 10Mb of data is downloaded to their browser before the page will display. We would suggest that this is very large and could result in users simply not waiting for the page to load."

    Is there anything i can do to make the site run and open faster?

    #2
    Sounds extremely large.
    Do you have a URL for the site?
    Is this an upgrade from a previous version of Actinic or a new site design?
    Darren Guppy
    Golf Tee Warehouse
    Golf Tees and Golf Accessories.

    Comment


      #3
      Consider changing your menu type away from YahooSections. If you don't change your menu often then create a fixed menu instead.

      Search on th eforum and the KB and you will find lots of references to the size of Act_section_tree.js

      Comment


        #4
        Assuming site is www.britanniainks.co.uk then you are getting Actinic to create a huge JavaScript structure containing info about every page on your system. You're using this to generate drop-down lists for certain top level sections and their sub-sections.

        The idea is good but the 10Mb size of Act_section_tree.js will make your site unworkable for most customers.

        All you really need is a stripped down file containing only the first two levels of the section structure. This can probably be done by some PHP with a block around it so it only runs on the store top page.

        Also all those repeated, near identical "ACT_DropListBox..." JavaScript routines could be easily replaced by a single one with an extra two parameters containing the section number to generate the list for and the text to put in the default entry. Much easier to understand and maintain.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Yep agreed, it's time to scrap that menu, it was 5 years ago in all honesty, from an actinic point of view, there simply isn't a worse menu you could use. Smart theme, cgi nav, top level sections are all terms to use to find the wealth of knowledge on switching it over. Hopefully it's in the KB too by now. A menu from drillpine.biz is probably an even better idea IMO.

          Comment


            #6
            Here's some (untested / incomplete) code that creates an optimal top and first level section JavaScript structure. To see how much code you can drop that 10Mb down to, try this:
            Create a new Fragment and paste the following into the fragment text.
            Code:
            !!<
            var i=-1;
            var s_t = new Array();
            function TL(name,url){
            	this.sN=name;
            	this.sU=url;
            	this.pC=new Array();
            	i++;
            }
            function SL(name,url){
            	this.sN=name;
            	this.sU=url;
            }
            <actinic:block type="TopLevelSectionList">
            	s_t.push(new TL('[SectionName]','[SectionURL]'));
            	<actinic:block type="ChildSectionList">
            		s_t[ i ].pC.push(new SL('[SectionName]','[SectionURL]'));
            	</actinic:block>
            </actinic:block>
            >!!
            Now Preview your page, copy / paste the generated guff into a textfile, save it and see how big it is. More than 1000 times smaller than your 10Mb, I'll guess.

            Note that the Preview URL isn't the same as on live pages, so you may want to upload and check the live code.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Thankyou for your help, im not a developer, i can update content but html ill need step by step instructions.

              thanks for your help

              Comment


                #8
                The code I posted above is simple to add into a Fragment. It is just adding content!

                All you need to do is copy / paste it, then look at what results, which will be a listing of a lump of JavaScript code.

                That will then give you and idea of the size of the resultant HTML.

                If you want this developed further, email me for a quote.
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment

                Working...
                X