mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 06:21:45 +03:00
Data fetcher: Add Cache-Control header with max-age of a year.
Data URLs can't change, we want to assume they're fresh for as long as we can.
This commit is contained in:
parent
0dfbc80587
commit
ab4eab5706
@ -282,6 +282,12 @@ static void fetch_data_poll(lwc_string *scheme)
|
||||
PRIsizet, c->datalen);
|
||||
}
|
||||
|
||||
if (c->aborted == false) {
|
||||
/* Set max-age to 1 year. */
|
||||
fetch_data_send_header(c, "Cache-Control: "
|
||||
"max-age=31536000");
|
||||
}
|
||||
|
||||
if (c->aborted == false) {
|
||||
msg.type = FETCH_DATA;
|
||||
msg.data.header_or_data.buf =
|
||||
|
Loading…
Reference in New Issue
Block a user