-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Allow configuration of cache-control header (s3/digital ocean) #11
Comments
just cause I am curious, is this all browsers? or just firefox? I get a 404 at that specific site, but I can't reproduce with latest firefox on canopy's file. |
We could also try |
You get a 404 for https://openmrs-spa.org/import-map.json? I get a json file. @jonathandick was the one who experienced the problem. It appeared (although we're not 100% sure) that he was getting an old version of the importmap.
both Firefox and Chrome. If you uncheck the Disable Cache checkbox in the devtools, you stop getting the Cache-Control header. I think that means that the browser is caching the file even though the server says not to? Not 100% sure if I'm interpreting the devtools correctly. Either way, the original problem that caused this github issue is that it seemed like Jonathan was getting an old version of the import map. It could be related to Digital Ocean Spaces, instead of import-map-deployer, but I'm trying to figure out root cause. |
ok, that url works now. Not sure why it wasn't before. Anyways, firefox is actually working correctly: it shows "cached", but you can also see the latency and header field that is because it is sending the "validate" request. The cache-control "must-revalidate", means that the browser first checks to see if the version they have is the same. If its not the same, then it gets the whole file. Its a performance optimization. |
interesting. So I guess we'll just chalk the issue jonathan saw yesterday up to something we don't fully understand and can't reproduce :) |
See related openmrs/openmrs-esm-root-config#5.
Browsers sometimes willfully disobey cache-control max-age=0. So either changing the default to 10 seconds or at least making it configurable within config.json would let users try to work around the browser's behavior.
The text was updated successfully, but these errors were encountered: