I’m trying to add an image to a markdown file in my repo. The server updates the image every minute, but the image is cached by Github and therefore does not update in the readme.
I’m sending a cache-control header from a .htaccess file which looks like this:
set Cache-control: private, max-age=0, no-cache
I have limited understanding of caching, but I’ve noticed that Github Pages doesn’t cache the image when building the site, but it still caches the image in the readme.
Checking the Network tab on Chrome shows that the original image is sending this request header:
Cached by Github
But Github’s cached image is sending this request header:
Cache-Control: public, max-age=31536000