Repository navigation
Load CSS and JS files with a cache-busting param (temp solution) - #31
Conversation
| link.rel = "stylesheet"; | ||
| link.href = | ||
| AM_ASSETS_HOST + | ||
| "/static/css/index.3527160e.css" + |
There was a problem hiding this comment.
I think this is fine for now, but we should end up in the situation where we do not require a "cachebuster". Since that defeats the purpose of the cdn. (I actually think that this might not even work atm, since we're not forwarding the querystring values to the s3 bucket).
I think the eventual goal is to have each version of the css/js include its own unique hash (what I assume is happening right now), and cache those file to infinity. Then have a fixed path that will redirect the client to the latest version. This file will not be cached as long, and will be invalidated on every deploy. am will then include this fixed version in the source.
There was a problem hiding this comment.
yep that's what i saw as the end goal as well — in which case for the final release we'll switch back to using content hashes for autometrics-explorer (right now the hash values are unchanging bc of the cloudflare setup)
Might not be necessary given our setup, but I had this ready earlier in the week, figured I'd put it here for now