collectiveaccess / providence

Cataloguing and data/media management application
GNU General Public License v3.0
290 stars 166 forks source link

IIIF Service Should Allow Client Caching #1552

Closed miqrogroove closed 1 month ago

miqrogroove commented 3 months ago

This ticket will resolve part of the problems described in #1551.

The IIIF service currently disables all client caching due to this line of code...

https://github.com/collectiveaccess/providence/blob/32964a5e3a9260ae5611e8cc02adf055eb9d82aa/service.php#L43

Lack of client caching becomes more and more noticeable when using remote or mobile connections with limited connection quality. Overlay viewers employ a large number of asynchronous image requests. If one or more of those requests does not complete within the timeout period, the display will not recover. Without client-side caching, the web browser must repeat every request for every tile, even if the user has merely closed and reopened the overlay without refreshing the page. This still becomes problematic even if there are no errors because it slows down rendering tremendously compared to retrieving tiles from disk cache.