Page MenuHomePhabricator

Switching between images in Pholio causes a full reload of the image
Closed, DuplicatePublic

Description

Right now, pressing left/right in Pholio causes the entire image to be reloaded from the server, even if the image was previously loaded. This makes it really hard to do comparisons between alternatives.

Event Timeline

nornagon raised the priority of this task from to Needs Triage.
nornagon updated the task description. (Show Details)
nornagon added a project: Pholio.
nornagon added a subscriber: nornagon.

Potentially relevant: I see pholio preloading the images on pageload, but the server seems to be returning Cache-Control: no-cache, which might be what's causing Chrome to reload the image.

HTTP/1.1 200 OK
Server: nginx/1.4.6 (Ubuntu)
Date: Fri, 29 May 2015 19:17:18 GMT
Content-Type: image/jpeg
Content-Length: 598520
Connection: keep-alive
X-Powered-By: PHP/5.5.9-1ubuntu4.9
X-Frame-Options: Deny
Accept-Ranges: bytes
Cache-Control: private, no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: Sat, 01 Jan 2000 00:00:00 GMT
X-Content-Type-Options: nosniff

Also: the file appears to have 'Cacheable: no':

⇪_configure_-_kunkel_assembly__2x_jpg.png (231×443 px, 19 KB)

nornagon renamed this task from Switching between images in Pholio should be fast to Switching between images in Pholio causes a full reload of the image.May 29 2015, 7:32 PM

Possibly also relevant: I don't have security.alternate-file-domain set. Is that required to have cacheable images?

It's intentional that these images aren't cacheable, but we should try to improve the browser behavior.

It looks like it tries to preload (I see requests in the network tab in devtools for all the images in the mock as soon as I load the page), but doesn't do anything to keep the preloaded data around.