Images not getting cached using JavaScript innerHTML

I have a static website on AWS S3 Bucket and also a free Cloudflare plan.
In my website I have a gallery that loaded with JavaScript, by user action.
When a user clicks on a button, the JavaScript update a specific div (using innerHTML) to contain a basic tag with an image that sits on the same S3 Bucket.

I noticed that all images loaded that way ARE NOT GETTING CACHED.
Every image loaded that way has a Cf-Cache-Control set to MISS.


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.