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

Provide Last-Modified headers (or Etag) #3

Closed
NoraCodes opened this issue Feb 1, 2022 · 3 comments
Closed

Provide Last-Modified headers (or Etag) #3

NoraCodes opened this issue Feb 1, 2022 · 3 comments

Comments

@NoraCodes
Copy link
Contributor

We should provide a Last-Modified header which pulls its value from the paste file modification time (for pastes) or from the binary's compilation date (for CSS, JS, etc). This would allow CDN caches to revalidate simply by checking the Last-Modified date without actually transferring the body of the paste - especially good for images or large files accessed periodically.

Alternately we could provide an Etag header pulling from the current Git commit hash for CSS and JS, and from a cryptographic digest of the paste file for pastes.

@wantguns
Copy link
Owner

wantguns commented Feb 2, 2022

Adding that header was up on my todo list after I ran the lighthouse test on the site.
I did not know about the Etag header, that would be really neat.

I am a little busy right now, will work on it after a day or two.

@NoraCodes
Copy link
Contributor Author

No worries - if you don't get to it, I'll probably have some time soon. I just wanted to put in an issue so I remember

@NoraCodes
Copy link
Contributor Author

Addressed in #5

@wantguns wantguns closed this as completed Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants