Closed NoraCodes closed 2 years ago
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.
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
Addressed in #5
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 theLast-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.