2 ms·
> a lot of users would have React in their browser cache anyway Not cross-origin, anymore. Every major browser now has cache partitioning (cache indexes are ke
by eyelidlessness 5y ago
> a lot of users would have React in their browser cache anyway
Not cross-origin, anymore. Every major browser now has cache partitioning (cache indexes are keyed by the requesting domain and the resource) for privacy reasons. Which means, for instance, the old optimization of using dependencies from a CDN is now suboptimal.
- anamexis 5y agoI'm guessing almost no one benefitted from cross-origin caching with React anyways, since it is almost always bundled up with Webpack. It's not like jQuery or Font Awesome.
- eyelidlessness 5y agoI’m not sure I could quantify it, but CDNs were a prominent recommendation for React at least until CRA was pervasive. Another thing worth mentioning, and another point in Preact’s favor, is ESM and tree-shaking. React still doesn’t officially ship ESM, and the ability to strip unused functionality at build time is hampered by that because ESM is more amenable to static analysis. Whereas Preact, which is already much smaller on the wire, can become smaller still because it supports ESM.