I would like to know when I should include external scripts or write them inline with the html code, in terms of performance and ease of maintenance.
What is the general practice for this?
Real-world-scenario - I have several html pages that need client-side form validation. For this I use a jQuery plugin that I include on all these pages. But the question is, do I:
- write the bits of code that configure this script inline?
- include all bits in one file that's share among all these html pages?
- include each bit in a separate external file, one for each html page?
Thanks.