Benefit of maintaining separate Javascript file in HTML

ยท

1 min read

The benefit of a separate file is that the browser will download it and store it in its cache. So the Other pages that reference the same script will take it from the cache instead of downloading it, so the file is actually downloaded only once. This reduces traffic and makes pages faster.

ย