Closed FlorisFokkinga closed 3 months ago
This is not really a bug, it's firefox trying to prefetch images, or trying to ascertain that they still exist. Not really a bug.
Having said that, it would probably make sense to improve caching for images. The current cache headers set are:
cache-control: max-age=1209600
cache-control: nocache, private
which probably causes browsers to not cache the images at all. We should probably change this to a long cache duration for all images, as the image url will change if the image is changed anyway.
Better headers for images are probably:
Cache-Control: public, max-age=31536000, immutable
@mrvanes The header set in the SRAM application are overridden in Ningx, can you add the headers in SBS Ningx config for all paths api/images/*
?
works:
╰─▶ curl -v -o/dev/null https://test.sram.surf.nl/api/images/organisations/acbecfd4-040b-40d6-b0d0-2b8f96c589ee 2>&1 | grep cache
< cache-control: max-age=31536000, public, immutable
For instance on https://test.sram.surf.nl/organisations/361/collaborations