4 ms·
The proposed solution in "index.html contains fully-qualified references to the static assets" seems backwards. Changing resources from `./main.js` to `https://
by diggan 8y ago
The proposed solution in "index.html contains fully-qualified references to the static assets" seems backwards. Changing resources from `./main.js` to `https://assets.myapp.com/apps/1.0.2/main.js` https://assets.myapp.com/apps/1.0.2/main.js` makes the opposite of an "immutable application" in that loading the script will effectively be a side-effect and depending on other factors than just the index.html link with it's child directories.
Overall it seems like a good framework, but not making all resources self-contained + relative, seems like a step backwards in that you're locking your resources to a specific domain, which might or might not be available.
- knubie 8y agoIt's immutable in the sense that `<script src="https://assets.myapp.com/apps/1.0.2/main.js">` https://assets.myapp.com/apps/1.0.2/main.js">` will always load the same resource whenever the page is loaded (especially if it's cached indefinitely). Where as `<script src="./main.js">` could potentially load different versions of `main.js` depending on the release version.
- nmca 8y agoAnd particularly, if you always host the old versions then you can rollback by updating index.html - rollbacks are otherwise hard when you start thinking about caches.