4 ms·
Use CDNs for delivering JavaScript libraries instead of including everything into custom bundles. React could be transferred ONCE to the browser-cache instead
by cel1ne 6y ago
Use CDNs for delivering JavaScript libraries instead of including everything into custom bundles.
React could be transferred ONCE to the browser-cache instead of hundreds of times.
- youngtaff 6y agoThis isn't effective as browsers partition the cache using a double (or triple) key of the document origin and third-part origin. Safari started this and Chrome is following - https://andydavies.me/blog/2018/09/06/safari-caching-and-3rd-party-resources/ https://andydavies.me/blog/2018/09/06/safari-caching-and-3rd... So with a public JS CDN React would be still transferred multiple times. Using a custom bundle is probably more efficient as it should compress better resulting in lower download sizes (bit often modern bundles are huge so I wouldn't rely on this point)