You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if we should use etags for our thumbnails. this would let the browser query whether there's a new preview.
The endpoint would need to check the etag against the file's etag and return 304 not modified if there is no change instead of attempting to read the existing thumbnail from disk
For that we can simply use the file's etag from oc_filecache early on
It might not be much for the small thumbsnails but would save more traffic for files_mediaviewer when accessing bigger previews.
Maybe the preview size needs to be computed into the etag
I wonder if it would work as well with video previews...
Need to research whether browsers store Etags based only the URL resource part or whether it also covers URL parameters. Depending on this we might or might not need to change the way how the URLs are constructed, which we'll likely not want to change yet again.
If it can work with the current URL scheme it could be worth a try.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.
Activity
DeepDiver1975 commentedon Apr 16, 2019
The new preview endpoint does not send the etag header in the response - the browser in return has no chance to cache anything.
This was different in the old endpoint .... too bad.
We should consider this a bug/regression.
PVince81 commentedon Apr 16, 2019
I think we never sent etags before, even in the old endpoint.
We do return cache headers: https://github.com/owncloud/core/blob/stable10/apps/dav/lib/Files/PreviewPlugin.php#L134
DeepDiver1975 commentedon Apr 16, 2019
hmmm .... did I mix this up with avatars ....
anyway - as soon as we return etags the situation should get much better ....
[-]Etag for previews / thumnails[/-][+]Etag for previews / thumbnails[/+]stale commentedon Sep 20, 2021
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.