5 ms·
Question. From my experience, GitHub uses the `github-amo` bot to fetch the data when the page is rendered. How did you prevent it from cacheing on GitHub's s
by cjhanks 6y ago
Question. From my experience, GitHub uses the `github-amo` bot to fetch the data when the page is rendered. How did you prevent it from cacheing on GitHub's servers?
- maybevain 6y agoI was wondering the same. Seems like returning a no-cache value for the Cache-Control header prevents the Camo service from caching the image [0]. My browser did however cache the latest image (which is why I thought the system was not working for a second), and I'm not sure how to get around that. [0] https://docs.github.com/en/github/authenticating-to-github/about-anonymized-image-urls#an-image-that-changed-recently-is-not-updating https://docs.github.com/en/github/authenticating-to-github/a... EDIT: I see. The no-cache causes the Camo service to refetch the image every time it is requested, but it still applies a 4 hour cache time to the response to the browser so it is anyway cached on the client side.