-5

why would an external javascript script file be used as an alternative to an embedded script file? what are the benefits and negatives

kkrambo
  • 6,643
  • 1
  • 17
  • 30
  • 2
    "please give in detail" <−− This applies to questions, too. More: [tour], [help], [*How do I ask a good question?*](/help/how-to-ask) – T.J. Crowder Dec 18 '16 at 13:49
  • There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs. – roberrrt-s Dec 18 '16 at 13:53
  • @ProgrammingNinja but not a good one. Read the recommended resources and [edit] it accordingly. – jonrsharpe Dec 18 '16 at 13:57

1 Answers1

0

Embedded script files can only be used from the webpage in which they are embedded. External script files can be used from any webpage. This is useful as you do not need need to type the code again into every page. It saves time and file size. You can also edit a function by just editing the script file, and you do not have to edit the script on every webpage.

Wais Kamal
  • 5,858
  • 2
  • 17
  • 36