[GH-ISSUE #119] Generate Last-Modified and ETag headers #95

Closed
opened 2026-02-25 23:40:40 +03:00 by kerem · 1 comment
Owner

Originally created by @Nutomic on GitHub (Jun 2, 2020).
Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/119

According to the docs of Pagespeed Insights, these headers are vital for browser caching of resources.

Both of these headers should be pretty easy to generate based on the filesystem. For last-modified, you just need to read the modification time from the filesystem. And for the etag, use something like an sha1sum of the file.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Etag

Originally created by @Nutomic on GitHub (Jun 2, 2020). Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/119 According to the [docs of Pagespeed Insights](https://developers.google.com/speed/docs/insights/LeverageBrowserCaching#recommendations), these headers are vital for browser caching of resources. Both of these headers should be pretty easy to generate based on the filesystem. For last-modified, you just need to read the modification time from the filesystem. And for the etag, use something like an sha1sum of the file. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Etag
kerem closed this issue 2026-02-25 23:40:40 +03:00
Author
Owner

@geek-at commented on GitHub (Jun 2, 2020):

Great idea, thanks

<!-- gh-comment-id:637844876 --> @geek-at commented on GitHub (Jun 2, 2020): Great idea, thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pictshare#95
No description provided.