Question:
Can a script be placed in an external JavaScript file so it doesn’t have to be placed on all 200 pages of our Web site?
Answer:
Yes, as long as you don’t mind not supporting Netscape 2.x you can reference JavaScript from an external file from your scripts. To do this use the SRC attribute of the SCRIPT tag:
In addition, your Web server must be configured to associate the JavaScript file extension (.js) with the application/x-javascript MIME type.
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.























