Re:The Cost of JavaScript Frameworks
by forgotmypw23 on Friday May 08, 2020 @02:48PM
(#23118068)
if your js is small, you can avoid two of the costs by inlining it.
[ Parent
| on HN ]
Re:The Cost of JavaScript Frameworks
by biryani_chicken on Friday May 08, 2020 @03:32PM
(#23118533)
And download it every time? It is better to download it once and tell the browser to cache it.
Re:The Cost of JavaScript Frameworks
by horsawlarway on Friday May 08, 2020 @05:20PM
(#23119604)
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.