map $http_accept $webp {
default "";
"~*webp" ".webp";
}
location ~* "^/wp-content/uploads/.+\.(png|jpe?g)$" {
expires max;
add_header Vary Accept; #if this line is commented - chrome RAM caches images
log_not_found off;
access_log off;
try_files $uri$webp $uri =404; #if this line is commented - chrome RAM caches images
}
webp disk caching
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
Vary Accept;
I am not sure of the underlying cache logic, but I realise that serving multiple resources from the same URL leads to decisions being taken elsewhere by caches I am not responsible for. In this case the local cache.
:authority:wondershift.biz
:method:GET
:path:/chromium-dev/awesome/2000/very-old-format.jpg
:scheme:https
accept:image/webp,image/*,*/*;q=0.8
accept-encoding:gzip, deflate, sdch, br
accept-language:en-US,en;q=0.8
cache-control:no-cache
cookie:SESSION=value; wfvt_key=value
pragma:no-cache
referer:https://wondershift.biz/chromium-dev/
user-agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6 resisting sierra) Chrome/i2.KeWL Safari/12 N0t
accept-ranges:bytes
cache-control:max-age=315360000
content-length:25696
content-type:image/webp
date:Mon, 14 Nov 2016 20:16:28 GMT
etag:"5829f781-6460"
expires:Thu, 31 Dec 2037 23:55:55 GMT
last-modified:Mon, 14 Nov 2016 17:42:25 GMT
status:200
vary:Accept
accept-ranges:bytes
cache-control:max-age=315360000
content-length:25696
content-type:image/webp
date:Mon, 14 Nov 2016 20:13:52 GMT
etag:"5829f781-6460"
expires:Thu, 31 Dec 2037 23:55:55 GMT
last-modified:Mon, 14 Nov 2016 17:42:25 GMT
p3p:CP=WS has no P3P policy. This technology is outdated and not worth implementing
status:200
timing-allow-origin:*
x-content-type-options:nosniff
x-frame-options:deny
x-xss-protection:1; mode=block
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
Blink normally does not serve resources from memory cache if they have Vary headers. Some exceptions:- preloads- images (wonder why this isn't happening...)