-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cache-control for resources #60
Conversation
It works on stage.winden.app |
Regarding the caching of code I have seen the following pattern in the past: Cached code elements use a filename which contains a hash value derived from the content, e. g. This has the advantage, that you can cache code (JavaScript and WASM) indefinitely while still having the possibility to perform an update which will roll out to all users as fast as possible. I assume that this would require updating the way we build our application, but it might be useful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only question I have: What happens when we update js/wasm? Is the change propagating immediately or do we need to wait until the data expires?
From a quick scan I believe a user will have to wait at least 1 day to see the change (unless they e.g. " I believe webpack does this by default, but I don't know how we're packaging JS. |
We use gulp, but I see there are some webpack stuff too. However we don't have hash filename for wasm or js put in place. Maybe we can do that? https://www.npmjs.com/package/gulp-hash-filename @JustusFT what is your opinion here? |
We may be able to automatically hash the wasm file if we can use a webpack loader to build it (maybe this?). Otherwise we can use |
I will update cache-control to remove js and wasm till find option to generate them with hash filenames |
For further improvement, this task: #65 |
As we are not using any CDN, lets add some cache-control for static resource management, to speed up a little bit of Winden.app resources