4 ms·
I feel like this is one of those things that I have been thinking to my self for a little while now. "Why hasn't someone already solved this problem." In my min
by jFlatz 9y ago
I feel like this is one of those things that I have been thinking to my self for a little while now. "Why hasn't someone already solved this problem." In my mind there is no reason for my browser to download 26 copies of the same jquerry file.
- ChrisSD 9y agoIf [websites] use a common CDN then this can be avoided. [edited, with thanks to delinka]
- delinka 9y agoIf the sites you're visiting use a common CDN then this can be avoided.
- tracker1 9y agoThis was going to be my comment as well.. I tend to prefer cdnjs for as much as possible, since it seems to be the most diverse CDN in terms of supported libraries. Though I've been trending away from using most libraries separately and bundling... may need to think about breaking things out again. For the most part, however, most of my bundle sizes are pretty small. React in dev, Preact for prod is the biggest mix... checking bundle size before/after adding a module (some will add a huge dependency tree). There's no substitution for being judicious... and imho, even if you have to look it up frequently, using the DOM is usually better than loading in jQuery... even if you center around Array.from(document.querySelectorAll('...')) as your main usage.
- cpeterso 9y agoHere is a proposal to use the hashes from <script> elements' Subresource Integrity attributes to cache JavaScript. There are some concerns about leaking users' browsing history based on resource load times. https://hillbrad.github.io/sri-addressable-caching/sri-addressable-caching.html https://hillbrad.github.io/sri-addressable-caching/sri-addre...