Announcement

Collapse
No announcement yet.

Separating Javascript from HTML

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

    Separating Javascript from HTML

    Is there an easy way that the javascript that gets included on all the catalog pages can be separated out into an external file? That way each page can just reference the external file instead of loading the scripts individually. My thinking is that this may help to improve the keyword density of a page and improve its content to code ratio.
    Last edited by domino1; 30-Jun-2004, 10:49 AM. Reason: grammar correction

    #2
    That's what happens for the larger JavaScript files. E.g. actiniccore.js, actinicextras.js and the section tree files. There should only be small chunks of JavaScript in most generated pages.

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

    Comment


      #3
      Thanks Norman.

      Out of interest, why isn't all of the js located in these external files?

      Comment


        #4
        Note that when search engines look at the keyword density they only look at content (i.e. stuff that's visible to the user). Not code.

        So there's no real penalty to having some bits of javascript on the page other than a little bit of loading time. (a tiny, tiny, tiny difference even on dial up).

        Mike
        -----------------------------------------

        First Tackle - Fly Fishing and Game Angling

        -----------------------------------------

        Comment


          #5
          Just as an add on to the above.

          I would steer clear of having a log on box on every page as the code used for it is like a mini novel.
          Owner of a broken heart

          Comment

          Working...
          X