I need to know the benefits of doing it either way, specifically which loads the script faster, and which is easier to edit if something goes wrong.
Asked
Active
Viewed 93 times
-5
-
Google will provide you with the answer. – ggdx Dec 14 '15 at 12:38
-
Simply Web performance really matters ! 99% times it will give you faster end-user response times. – Akram Saouri Dec 14 '15 at 12:38
-
Possible duplicate of [When should I use Inline vs. External Javascript?](http://stackoverflow.com/questions/138884/when-should-i-use-inline-vs-external-javascript) – JJJ Dec 16 '15 at 10:38
2 Answers
0
Advantages for external js file
It separates HTML and code
It makes HTML and JavaScript easier to read and maintain
Cached JavaScript files can speed up page loads

Shailesh Katarmal
- 2,757
- 1
- 12
- 15
0
Using separated files, the browser can cache files like css and javascript. Use separated files. To speedup performance read about CDN (Content Delivery Network). Tks.

Igor Quirino
- 1,187
- 13
- 28