3 ms·
Images should be cached (I have this header: Cache-Control: max-age=31536000, public)
by 1mbsite 7y ago
Images should be cached (I have this header: Cache-Control: max-age=31536000, public)
- 1mbsite 7y agoThe first time it reads the image is to get info about it (what type of image) - the second call actually reads the file into memory and outputs it
- kseistrup 7y agoWell, when you have read the image once to get the info then you already have the file and can “output it”. To fetch it again is just a waste of resources.
- 1mbsite 7y agoI’ll take all this feedback into account. It’s a beta app so it improves daily. For some insight all functionality you see right now was built in less than a month by only 1 person
- kseistrup 7y agoBut that header is valid per client that is using sunshine.social, isn't that so? That means that every client that looks at my profile will fetch the image at least once. The images is fetched from IP address 104.131.188.4, and it is that host – not the client – that should cache the image and only download a new copy if If-Modified-Since or eTag indicates that the image has been changed.