Since starting to use (and evaluate Netlify for our future purposes), I’ve noticed a strange behavior - only the first js chunk comes in via cloudfront (with a fairly consistent <200ms delay). The rest comes in “directly”, and ever so often the site load crawls since the subsequent js chunks take upto 4 - 8 seconds to come in.
The first chunk always has the form
https://<>.cloudfront.net/bundles/<> while the remaining have the form
/static/js/13.9e1a5fcf.chunk.js (ie the chunks created due to lazy loading etc). This is a React site.
Looking at this behavior and the HTTP response headers on each js chunk leads me to believe that subsequent chunks are not cached via a CDN. But that can’t be right, or?
- Am I correct with this above conclusion?
- Is this a feature or a bug? Or am I missing something else altogether?
PS: I tried searching thru the forums for something similar to this concern, but could not find. If there are other threads, please point me to them.