calling .js file - will this help?

M

minchu

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="JavaScript" 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.
 
H

Howard Kaikow

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top