-
Notifications
You must be signed in to change notification settings - Fork 232
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
gateway: clarify Last-Modified #470
base: main
Are you sure you want to change the base?
Conversation
- No matter if TTL value is known or not, implementations SHOULD always | ||
send a [`Last-Modified`](#last-modified-response-header) header with the timestamp of the record resolution. | ||
- Implementations MAY also place an lower bound of 1 minute to avoid excessive lookups. | ||
- If TTL value is unknown, implementations MAY not send a `Cache-Control` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May not?
- If TTL value is unknown, implementations MAY not send a `Cache-Control` | |
- If TTL value is unknown, implementations MAY send a `Cache-Control` |
When `Cache-Control` is not present, `Last-Modified` value also acts as a hint | ||
for web browsers in a process called "Calculating Heuristic Freshness" | ||
(Section 4.2.2 of :cite[rfc9111]). Each browser uses different heuristic, | ||
making this an inferior, non-deterministic caching strategy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much more helpful for me.
- No matter if TTL value is known or not, implementations SHOULD always | ||
send a [`Last-Modified`](#last-modified-response-header) header with the timestamp of the record resolution. | ||
- Implementations MAY also place an lower bound of 1 minute to avoid excessive lookups. | ||
- If TTL value is unknown, implementations MAY not send a `Cache-Control` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May not?
- If TTL value is unknown, implementations MAY not send a `Cache-Control` | |
- If TTL value is unknown, implementations MAY send a `Cache-Control` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: include information about optional modtime from UnixFS 1.5 (ipfs/boxo#659) and what takes priority on IPNS (modtime form dag-pb or ipns name resolution time)
Closes #467 by updating
Last-Modified
section.We forgot to do that as part of TTL cleanup, and that created contradiction reported by @SgtPooki (thx!)