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 Low-level infrastructure, including the build

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 matthew-white added the infrastructure Low-level infrastructure, including the build label Dec 2, 2021
@matthew-white matthew-white linked a pull request May 22, 2023 that will close this issue
@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Low-level infrastructure, including the build
Projects
Status: ✅ done
Development

Successfully merging a pull request may close this issue.

1 participant