3 ms·
> Does any browser cache the parsing, tokenizing and built AST of Javascript libraries between website visits? From a quick googling, yes, at least some of the
by myfonj 4y ago
> Does any browser cache the parsing, tokenizing and built AST of Javascript libraries between website visits?
From a quick googling, yes, at least some of them. (TIL):
https://stackoverflow.com/questions/1096907/do-browsers-parse-javascript-on-every-page-load https://stackoverflow.com/questions/1096907/do-browsers-pars...
>> The third time (i.e. a hot run), Chrome takes both the file and the file’s metadata from the cache, and hands both to V8. V8 deserializes the metadata and can skip compilation.
— https://v8.dev/blog/code-caching-for-dev https://v8.dev/blog/code-caching-for-dev
> Also, I don't visit UK government websites that often -- so I'd suspect I am "cold cache" whenever I do.
For first visit with given browser and profile (or incognito mode), sure.
But if you visit more than single page during same session, you probably have more than a "cold cache". That measured page mentioned in the article seems to be guidepost with only most important excerpt of the content, so it seems plausible you would "click around a bit" from there.
- youngtaff 4y agoScripts cached by a Chrome Service Worker will be compiled to byte code and cached too https://v8.dev/blog/code-caching-for-devs#use-service-worker-caches https://v8.dev/blog/code-caching-for-devs#use-service-worker...