Saketh Kowtha
Articles by @sakethk

Follow

Articles by @sakethk

Follow

Benefit of maintaining separate Javascript file in HTML

Saketh Kowtha's photo
Saketh Kowtha
ยทJul 3, 2021ยท

1 min read

Play this article

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.

ย 
Share this