Hacker News new | past | comments | ask | show | jobs | submit login

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.




Indeed, 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...


> 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).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: