>

Thursday, 17 December 2015

External Javascript file

Place all your scripts in to an external file with a .js extension ,link that external file in your script
code using "src" attribute.
Advantages:
Commonly used javascript code can be shared among a number of pages.
Only a single copy needs to be stored on the web server. Such JavaScript
files can be cached by the browser, there by allowing faster loading of the pages.
Example:

0 comments:

Post a comment