I have html5 games that are loaded in iframes (from the same domain though) which are composed of thousands of small png’s. And I simply cannot figure out how to get these to cache consistently. Obviously, this is a massive drain on the server. When I run chrome dev tools, and click on the png’s, most come up as “Revalidated” with no cache date set (I’m guessing that’s why they’re revalidating?).
First I set up a “cache everything” rule for the entire website… didn’t help.
I set up a “cache everything & edge cache: a month” rule for specifically the folder with the game files and put that as #1… didn’t help. (i tried purging the folder too just in case first and refreshing the page etc).
I tried explicitly adding a rule in .htaccess…
Header set Cache-Control “max-age=84600, public”
…and purging .htacess but still the png’s appear to have no expiration date set when I check in dev tools.
For the separate “browser cache TTL” setting I have tried both “1 year” as well as “respect existing headers”
Here’s the header data for one example… I just tried switching “browser cache TTL” back to “1 year” so now I’m seeing cache dates and yet it’s STILL coming up revalidated… What’s going on??