|
Using a single external scripts file?
Hi.
I read somewhere that if I place all of my javascript code in a single file and link to that file in the html code of all the pages of my website,it would load fast.However I want to use different files to store my code,since it lets me keep my code organized.I mean that I want to put all the code related to a certain category in one file,and code related to other categories in seperate files.E.g all the code related to form submission would be in one file,while all the code related to page decoration would be in another.But in that case,if the user visits my homepage,then visits page A,and then goes to the page involving a form submission,the code for the form submission would be loaded as new code.Would it slow down the loading of the page?What should I do?
thanks!
|