Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Web Design (WordPress, Joomla, etc.) How do I set up an external JavaScript?

  • How do I set up an external JavaScript?

    Posted by Robert Stoelting on February 1, 2007 at 7:21 pm

    I read in “Web Site Services” that externalizing JavaScripts helps with SEO by getting the script out of the top of the page. I don’t know how to write JavaScripts, but I use prepared scripts from Dreamweaver and other sources. How/Where can I learn to make these scripts external and reference them on the pages I use them on (without having to learn JavaScript)?

    Curtis Thompson replied 19 years, 5 months ago 2 Members · 1 Reply
  • 1 Reply
  • Curtis Thompson

    February 1, 2007 at 7:27 pm

    hello…

    pretty simple – just take the javascript block you have (just the js code – not the wrapper <SCRIPT> and comment lines) and put it in an external file somewhere and name it [NAME].js (with your own [NAME] naturally) – then reference it in one script call line:

    <SCRIPT SRC=”[NAME.js” type=”text/javascript”></SCRIPT>

    more here:

    https://www.javascriptkit.com/javatutors/external.shtml

    sitruc

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy