3 ms·
Given that SPDY is pretty well supported by browsers, and that HTTP2 will have similar features... it may be better just to serve all of your own scripts/css on
by tracker1 12y ago
Given that SPDY is pretty well supported by browsers, and that HTTP2 will have similar features... it may be better just to serve all of your own scripts/css on the same domain via https.
As for your suggestion... the browser can easily cache the CDN resource as it does now... without a complicated new protocol. The main difference being the integrity check. All of that said, as others have suggested, another nicety would be a local-src="" url, that could be used as a fallback if the cdn resource fails the integrity check.
- TazeTSchnitzel 12y ago> the browser can easily cache the CDN resource as it does now... without a complicated new protocol I know. But the use of CDNs has problems (CDN dies, cache fragmentation across multiple CDNs, extra connections).
- derefr 12y agoIndeed, I was imagining recently that an HTTP2 server, properly configured, should actually rewrite pages that refer to third-party assets by first retrieving those assets, and then sending its local cache version. This would also work pretty well for a multi-site reverse-proxy like Cloudflare, where it could hit cache for commonly-used asset URLs even if your site in particular was evicted. Hey, wait a minute...