- Back to Home »
- External Javascript file
Posted by : Sushanth
Thursday, 17 December 2015
Place all your scripts in to an external file with a .js extension ,link that external file in your script
code using "src" attribute.
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.
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.