calling .js file - will this help?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • minchu

    #1

    calling .js file - will this help?

    Hello,
    I have created a site using DreamWeaver and I have used some behaviors
    (mouseover, showhide layers etc.). Is it better to keep all the
    scripts used for mouseover, showhide layers in a .js file and link
    it(<script language="JavaS cript" type="text/JavaScript"
    src="mover.js"> </script>)
    or is it better to leave it in the header part of each individual HTML
    pages.
    I was asuming, keeping the script in .js file will reduce size of each
    html and also it's good for web crawlers.
    Kindly suggest me about this.

    script inside the html - http://www.teledna.com/pages/aboutus.html
    script called from .js file -


    Regards,
    Minchu.
  • Howard Kaikow

    #2
    Re: calling .js file - will this help?

    Putting the .js in a file, rather than replicating in numerous HTML pages,
    is much better if only for code management.
    You would then change the code in only 1 place to have the changes apply to
    all the pages referencing the .js.

    --
    http://www.standards.com/; See Howard Kaikow's web site.
    "minchu" <minchu2000@yah oo.com> wrote in message
    news:4df28e6f.0 410122203.5a204 c96@posting.goo gle.com...[color=blue]
    > Hello,
    > I have created a site using DreamWeaver and I have used some behaviors
    > (mouseover, showhide layers etc.). Is it better to keep all the
    > scripts used for mouseover, showhide layers in a .js file and link
    > it(<script language="JavaS cript" type="text/JavaScript"
    > src="mover.js"> </script>)
    > or is it better to leave it in the header part of each individual HTML
    > pages.
    > I was asuming, keeping the script in .js file will reduce size of each
    > html and also it's good for web crawlers.
    > Kindly suggest me about this.
    >
    > script inside the html - http://www.teledna.com/pages/aboutus.html
    > script called from .js file -
    > http://www.teledna.com/test/pages/aboutus.html
    >
    > Regards,
    > Minchu.[/color]


    Comment

    Working...