3 ms·
> But when it’s on every page, from a web performance perspective, it equates to a lot of data. How does browser caching come into play here? Doesn't it make a
by p4bl0 4y ago
> But when it’s on every page, from a web performance perspective, it equates to a lot of data.
How does browser caching come into play here? Doesn't it make a difference?
- firecall 4y agoYes, it makes a difference in network requests. It only needs to get the file from the Internet once, but the browser still has to load the file and work with it on each page load! :-) How that is handled exactly... I don't know LOL :-)
- josephg 4y agoBrowsers don't share cached assets between different origin domains any more. So the browser cache would only come in to play when you're browsing between pages on the same government website. But I'm not sure that downloading 32kb on each page load is their biggest problem. It sounds like a lot of the cost of jquery is parsing that javascript on each page load - especially on low specced devices. Javascript parsing traces (as far as I know) aren't reused between page loads at all.
- radarsat1 4y agoThis is an interesting point. Is there no way for cdn-hosted JavaScript to have their JIT results cached? I suppose the dynamic nature of JS might make that pretty difficult. (Lack of hermetic environment around modules, so global variables could change compilation results.)