Hacker News new | ask | show | jobs
by alttab 5945 days ago
In a second and real answer to your question, the file should only require the second HTTP request the first time. Any subsequent inclusions of that file won't go to the server to get it.

The downside is it makes each page bigger. If isn't a real small javascript file, you are adding all those bytes to each request. In this case, it would require more bandwidth to transfer the entire page at the same speed.

1 comments

if the time it takes to download the slightly page is less than the time it takes for the second request for a separate js file on average (including when cached), then i would be in the clear?