Re:Show HN: Monkberry – a JavaScript library for building we...
by drusepth on Thursday June 30, 2016 @01:15AM
(#12006718)
Wouldn't you just use a CDN that your visitor's browser would pull a cached copy from if you were worried about large assets? They're only downloaded once*, might as well re-use the one downloaded the last time you visited a site with React. Or do I not understand how browser caching works?
[ Parent
| on HN ]
Re:Show HN: Monkberry – a JavaScript library for building we...
by jacobr on Thursday June 30, 2016 @02:03AM
(#12006873)
This is nice in theory, but... A user visits site A. To get a cached version of React the following need to be true:
1. A user has to have visited a site, site B, with React recently. 2. The site with React needs to be using a publicly available CDN. 3. Site A and Site B must use the same CDN. 4. The versions of React must match exactly. There are already about a dozen alpha/patch/rc versions of the React 15.x.x series alone.
In practice, this does not happen very often: https://www.stevesouders.com/blog/2013/03/18/http-archive-jq...