Skip to content
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

Doublecheck cache control headers for dataset and annotation info request #6701

Closed
philippotto opened this issue Dec 16, 2022 · 2 comments · Fixed by #6937
Closed

Doublecheck cache control headers for dataset and annotation info request #6701

philippotto opened this issue Dec 16, 2022 · 2 comments · Fixed by #6937

Comments

@philippotto
Copy link
Member

If I see it correctly, the dataset info request doesn't have cache control response headers. Browsers might do heuristic caching in that case which could lead to annoying cache problems (see context). Quoting MDN:

Heuristic caching is a workaround that came before Cache-Control support became widely adopted, and basically all responses should explicitly specify a Cache-Control header.

@fm3
Copy link
Member

fm3 commented Mar 9, 2023

Do you think Cache-Control: no-cache is the right call here? I guess those two requests are not sent by the thousands for one user so refetching it always may be the safest variant while not being too annoying. I wonder if there are any GET routes where we would prefer the heuristic caching?

@philippotto
Copy link
Member Author

Do you think Cache-Control: no-cache is the right call here? I guess those two requests are not sent by the thousands for one user so refetching it always may be the safest variant while not being too annoying.

Yes, I think, Cache-Control: no-cache makes most sense for the info requests.

I wonder if there are any GET routes where we would prefer the heuristic caching?

Hm, apart from static assets (such as images), no GET routes come to my mind which should be explicitly cached in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants