Announcement

Collapse
No announcement yet.

actinic javascript huge files - Causing massive problem

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

    actinic javascript huge files - Causing massive problem

    Im having massive problems with Actinic Javascript.
    Whenever the files have to be loaded for the first time they take an age. I believe this puts people off and makes them close my site before its loaded.

    Act_sections_tree.js is currently 690kb and growing
    Others are around the 200kb mark.

    I notice if i delete the act_sections_tree.js then i dont have a navigation menu down the left hand side.
    Is there any way to compress this info ?
    http://www.irwebonline.com

    #2
    You simply have a HUGE number of sections (due to having one product per section).

    The only way to simplify this is to put all the relevant products (say all Alcatel Batteries) into a single section. Your top-level will still look the same but you'll have cut out that intermediate page.

    This will greatly reduce the size of these files.

    Norman
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      The reason there is one product per section is for the search engines. Doing it this way gets really good search engine rankings.

      What i want is a way so actinic only generates the top level sections for the menu bar on the left. Would this reduce the size of the file.

      The only other alternative i can see is using one of the basic themes and generating a design for it.
      http://www.irwebonline.com

      Comment


        #4
        OK that's easy to do and the files will be tiny.

        Edit Act_Primary.html (and any other Primary templates you use - see Design / Options / Layouts / Primary Templates) and replace the lines

        Code:
        <!--@act NETQUOTEVAR:SECTIONTREE_RAW -->
        
        <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
        <!--
        function YahooSections(ar)
        {
        var strIDs = '';
        for (var i=1;i<=ar.length;i++)
          {
          if (ar[i].sURL != null)
            {
            strIDs += '<a href="' + ar[i].sURL + '"><span class="actxxsmall"><b><font color="NETQUOTEVAR:FGCOLORCSS">' + ar[i].sName + '</font></b></span></a><br>';
              {
              if (ar[i].pChild)
                {
                for (var j=1;j<=ar[i].pChild.length;j++)
                  {
                  if (ar[i].pChild[j].sURL != null)
                    {
                    strIDs += '<a href="' + ar[i].pChild[j].sURL + '"><span class="actxxsmall"><font color="NETQUOTEVAR:FGCOLORCSS">' + ar[i].pChild[j].sName + '</font></span></a><br>';
                    }
                  }
                }
              }
            strIDs += '<br>'
            }
          }
        return strIDs
        }
        //-->
        </SCRIPT>
        with

        Code:
        <!--@act NETQUOTEVAR:TOPLEVELSECTIONS_RAW -->
        
        <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
        <!--
        function YahooSections(ar)
        {
        var strIDs = '';
        for (var i=1;i<=ar.length;i++)
          {
          if (ar[i].sURL != null)
            {
            strIDs += '<a href="' + ar[i].sURL + '"><span class="actxxsmall"><b><font color="NETQUOTEVAR:FGCOLORCSS">' + ar[i].sName + '</font></b></span></a><br>';
            }
          }
        return strIDs
        }
        //-->
        </SCRIPT>

        also replace the line

        document.write(YahooSections(section_tree))

        with

        document.write(YahooSections(sections))


        Norman

        PS If you want the lines double spaced then replace <br> (in the very long line above) with <br><br>
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment

        Working...
        X