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

Cache-Control in development nginx.conf #520

Closed
matthew-white opened this issue Dec 2, 2021 · 1 comment · Fixed by #805
Closed

Cache-Control in development nginx.conf #520

matthew-white opened this issue Dec 2, 2021 · 1 comment · Fixed by #805
Assignees
Labels
infrastructure Changes to core libraries or setup

Comments

@matthew-white
Copy link
Member

@ktuite encountered an issue during local development whereby Chrome would not reload an updated .js file. The file was not reloaded even after a hard refresh. As a result, a component did not reflect the latest changes. From Chrome devtools, it looked like the .js file was not requested: it was loaded from disk cache.

Right now, our development nginx.conf only sets Cache-Control for index.html, which matches what happens in production. In production, .js filenames contain a hash, which works for cache-busting, but it looks like that isn't the case in development. Given that, I think we should consider setting Cache-Control for .js files (and probably CSS files?) in the development nginx.conf.

@matthew-white
Copy link
Member Author

and probably CSS files?

I don't see CSS files in development. I think that styles are inlined in the JavaScript in development.

@matthew-white matthew-white self-assigned this May 24, 2023
@github-project-automation github-project-automation bot moved this to 🕒 backlog in ODK Central May 31, 2023
@matthew-white matthew-white moved this from 🕒 backlog to ✏️ in progress in ODK Central May 31, 2023
@github-project-automation github-project-automation bot moved this from ✏️ in progress to ✅ done in ODK Central Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Changes to core libraries or setup
Projects
Status: ✅ done
Development

Successfully merging a pull request may close this issue.

1 participant