-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Cache control of static resources #831
Comments
@veloman-yunkan In both cases a temporary redirection ti the URL with proper cacheid? What aboit head requests? |
I don't think so. At least definitively not for case # 2. The purpose of the cacheid is to avoid having the client using resources with different versions in the same time. For case # 1, it means that user does not ask for a specific version. Most of the time it means user does a specific request and are not using the ui (as all our ui must used cachedid). There is the specific use case of the |
Do we have legit scenarios where user will be out of sync? One of the primary goals is that the user never has to refresh manually. |
@mgautierfr Analysis seems pretty accurate to me. My first comment might not be that good. But we should do our best to avoid any legit scenario where user has to refresh manually. Maybe viewer should be cached and refresh if necessary based on an etag (we don't request it that ofyen anyway, each time we open a new tab I guess)? The only problematic scenario would be if API change an tab survives... then the user woyld have buggy behaviour as long as he keeps using the same tab (maybe we could have a background job checking and refteshing if necessary?) |
This is a sub-ticket of #650
#712 has introduced support for versioning static resources, however the HTTP caching side of their handling has not been addressed.
Currently a build of
kiwix-serve
containing static resource/skin/RESOURCE
with the cache id valueCACHEID
is supposed only to receive and handle requests of the form/skin/RESOURCE?cacheid=CACHEID
. #650 proposes responding to such requests withCache-Control: max-age=31536000, immutable
. That's easy.Questions:
Cache-Control
response to a request without any cache-id (/skin/RESOURCE
)?a. Iframe-based content viewer #716 has introduced a special user-facing static resource served at
/viewer
which is going to be accessed without any cache id. What should be the caching policy for that one (especially in interaction with [kiwix-serve] make the topbar customizable. kiwix-tools#17)?/skin/RESOURCE?cacheid=WRONGCACHEID
)?The text was updated successfully, but these errors were encountered: