Hacker News new | ask | show | jobs
by forgotmypw23 2235 days ago
if your js is small, you can avoid two of the costs by inlining it.
1 comments

And download it every time? It is better to download it once and tell the browser to cache it.
If it's inlined into another static resource, why not just cache that? HTML with an inlined script is just as valid a cache object as the plain script itself.