Skip to content

Conversation

@Altahrim
Copy link
Collaborator

Summary

immutable header is only supported by Firefox and Safari. When the resource is stale, Firefox don't send If-None-Match and If-Not-Modified-Since headers.
This commit force Firefox to send these headers when resources are stale.

Checklist

@Altahrim Altahrim requested a review from susnux March 27, 2025 15:50
@Altahrim Altahrim self-assigned this Mar 27, 2025
@Altahrim Altahrim added this to the Nextcloud 32 milestone Mar 27, 2025
`immutable` header is only supported by Firefox and Safari.
When the resource is stale, Firefox don't send `If-None-Match` and
`If-Not-Modified-Since` headers.
This commit force Firefox to send these headers when resources are
stale.

Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
@Altahrim Altahrim force-pushed the perf/force-sending-ifnonematch branch from 15fb17c to b83a4b5 Compare March 27, 2025 16:00
@Altahrim Altahrim marked this pull request as ready for review March 28, 2025 09:47
@Altahrim Altahrim requested a review from a team as a code owner March 28, 2025 09:47
@Altahrim Altahrim requested review from ArtificialOwl, skjnldsv and yemkareems and removed request for a team March 28, 2025 09:47
@solracsf
Copy link
Member

Has this been tested?

I mean, the immutable directive tells the browser that the resource will not change for the entire cache duration. Firefox (and Safari) respect this by not checking for updates, even if the resource is stale.

Since immutable tells browser not to check in the first place, it should never reaches a state where must-revalidate can take effect.

Correct me if I'm wrong.

This was referenced Aug 22, 2025
@Altahrim Altahrim removed the 3. to review Waiting for reviews label Aug 26, 2025
@Altahrim
Copy link
Collaborator Author

It was tested but it seems more related to time than headers.

@Altahrim Altahrim closed this Aug 26, 2025
@solracsf solracsf deleted the perf/force-sending-ifnonematch branch August 26, 2025 09:13
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants