ladybird/Libraries/LibWeb/Fetch/Fetching
Timothy Flynn d3041dc054 LibHTTP+LibWeb: Support the HTTP Vary response header
We now partition the HTTP disk cache based on the Vary response header.
If a cached response contains a Vary header, we look for each of the
header names in the outgoing HTTP request. The outgoing request must
match every header value in the original request for the cache entry
to be used; otherwise, a new request will be issued, and a separate
cache entry will be created.

Note that we must now defer creating the disk cache file itself until we
have received the response headers. The Vary key is computed from these
headers, and affects the partitioned disk cache file name.

There are further optimizations we can make here. If we have a Vary
mismatch, we could find the best candidate cached response and issue a
conditional HTTP request. The content server may then respond with an
HTTP 304 if the mismatched request headers are actually okay. But for
now, if we have a Vary mismatch, we issue an unconditional request as
a purely correctness-oriented patch.
2026-01-22 08:54:49 -05:00
..
Checks.cpp LibWeb: Store HTTP methods and headers as ByteString 2025-11-26 09:15:06 -05:00
Checks.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
FetchedDataReceiver.cpp LibHTTP+LibWeb: Support the HTTP Vary response header 2026-01-22 08:54:49 -05:00
FetchedDataReceiver.h LibHTTP+LibWeb: Support the HTTP Vary response header 2026-01-22 08:54:49 -05:00
Fetching.cpp LibHTTP+LibWeb: Support the HTTP Vary response header 2026-01-22 08:54:49 -05:00
Fetching.h LibHTTP+LibWeb: Store the in-memory HTTP cache without JS realms 2025-12-21 08:59:31 -06:00
PendingResponse.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
PendingResponse.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
RefCountedFlag.cpp Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
RefCountedFlag.h Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00