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

tmLanguage.json changes do not appear without resetting browser cache #6798

Closed
2 tasks done
deser opened this issue May 13, 2024 · 3 comments
Closed
2 tasks done

tmLanguage.json changes do not appear without resetting browser cache #6798

deser opened this issue May 13, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@deser
Copy link

deser commented May 13, 2024

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Any
  • Local OS: Any
  • Remote OS: Linux
  • Remote Architecture:
  • code-server --version: 4.23.0

Steps to Reproduce

  1. Open vscode in browser, open network panel, uncheck "Disable cache"
  2. Make a change to tmLanguage.json (for example add 1 symbol in existing "$comment" field, like "$comment": "Hello" -> "$comment": "Hello1")
  3. Re-deploy code-server
  4. Reload the browser page with vscode
  5. Observe in network panel that tmLanguage.json is not having the change

Expected

tmLanguage.json is not cached by browser when it has any changes

Actual

tmLanguage.json is cached by browser when it has any changes, so these changes do not appear until the page with vscode is reloaded without cache

Logs

No response

Screenshot/Video

No response

Does this bug reproduce in native VS Code?

I did not test native VS Code

Does this bug reproduce in GitHub Codespaces?

I did not test GitHub Codespaces

Are you accessing code-server over a secure context?

  • I am using a secure context.

Notes

I investigated a little bit and here are some thoughts:

  1. I see that the code-server uses weak eTag to cache resource, I verified that on changes to tmLanguage.json eTag is not getting changed.
  2. Seems like service worker (service-worker) intercepts requests, and, when catching 304 responds with cached resource which has 200 status. That's confusing to observe, that etag resource has 200 but not 304.
@deser deser added bug Something isn't working triage This issue needs to be triaged by a maintainer labels May 13, 2024
@code-asher
Copy link
Member

Interesting, I believe the eTag and service worker are provided by VS Code, which means this might be an upstream issue https://github.com/microsoft/vscode

But, maybe there is something odd in the way we wrap VS Code that causes the issue. We should try to reproduce in Codespaces to see if it is an upstream issue or a code-server issue.

@code-asher
Copy link
Member

Since for now it seems like there is not something we can change in code-server, I will go ahead and close the issue. If that changes we can reopen.

@code-asher code-asher closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2024
@code-asher code-asher removed the triage This issue needs to be triaged by a maintainer label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants