4 ms·
That last one is already implemented with browser caching. Go to a popular website and check the Requests tab on your dev console, it'll probably show 304s for
by quantumtremor 10y ago
That last one is already implemented with browser caching. Go to a popular website and check the Requests tab on your dev console, it'll probably show 304s for CDNs. But possibly some companies join many JS files together before publishing.
- xg15 10y agoThat requires you (as a site author) choosing between two evils, however - even though there no real technical reason why you should have to: Either copy framework-of-your-choice.js to your own host and accept duplication - or serve it from the framework's CDN and get great caching but also accept that you don't have any control anymore what scripts run on your page.
- firloop 10y agoOr use a CDN and subresource integrity which makes the browser check the script against a hash. https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity https://developer.mozilla.org/en-US/docs/Web/Security/Subres...