5
About which files are you talking exactly?
If you use or reuse JavaScript this poses no additional threads or overhead, as long as it stays to pure Javascript functions in the browser manipulating the browser document.
If you are meaning Ajax, which is also run with JavaScript, then the situation is different, because it will request additional data of the server, which is delivered by some PHP code. For this PHP code, the security rules have to be observed for not inducing security leaks.