Page MenuHomePhabricator

Images in Phriction are served with `no-cache` cache-control on Phacility
Closed, DuplicatePublic

Description

I don't know if that's per-design or an oversight, but this makes wiki pages with a number of PNG images slow to reload since the browser can't cache them.

Request URL:https://d3cn662t4iw3q4.cloudfront.net/file/data/<REDACTED>.png
Request Method:GET
Status Code:200 OK
Remote Address:<REDACTED>
Response Headers
view source
Accept-Ranges:bytes
Cache-Control:private, no-cache, no-store, must-revalidate
Connection:keep-alive
Content-Length:30352
Content-Type:image/png
Date:Tue, 02 Feb 2016 00:56:12 GMT
Expires:Sat, 01 Jan 2000 00:00:00 GMT
Pragma:no-cache
Server:Apache
Strict-Transport-Security:max-age=0; includeSubdomains; preload
Via:1.1 cff9911a0035fa608bcaa4e9709161b3.cloudfront.net (CloudFront)
X-Amz-Cf-Id:wi1HPbXn7TlOzNzVQyVTNeXg3Ndt9y3oQlAbHHggmEP659_U3xQjEg==
X-Cache:Miss from cloudfront
X-Content-Type-Options:nosniff
X-Frame-Options:Deny
Request Headers
view source
Accept:image/webp,image/*,*/*;q=0.8
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en-US,en;q=0.8,fr;q=0.6
Cache-Control:max-age=0
Connection:keep-alive
DNT:1
Host:d3cn662t4iw3q4.cloudfront.net
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36

I also see X-Cache:Miss from cloudfront whenever reloading the images.