Atozed Forums

Full Version: no-cache for temporary files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm creating lots of tmp files with TIWAppCache.AddFileToCache(self,... calls or similar and then serve them to client on request, but the problem is that I reuse the same names (matching original file names) and the browser caching messes it up for me.

I can see IW is sending these headers ("cache-control: private"), see attached.

And no matter what I tried, this does not change. I tried extra headers in the form, as well as AllowCaching & CacheControlEnabled in the server controller, but neither makes any difference.
We cant see the image. Please save it as a file and then attach it.
(02-11-2022, 08:15 PM)kudzu Wrote: [ -> ]We cant see the image. Please save it as a file and then attach it.

I've edited the original post. Interesting how it allows pasting imaged and actually displays them in edit mode...
Some browsers don't re-validate the cached file and will just use whatever they have in their cache system. I've seen this sooooo many times.

The rule of thumb is: if the file has changed, change the file name. That's the only way to make sure it will refresh.
(02-14-2022, 05:42 AM)Alexandre Machado Wrote: [ -> ]Some browsers don't re-validate the cached file and will just use whatever they have in their cache system. I've seen this sooooo many times.

The rule of thumb is: if the file has changed, change the file name. That's the only way to make sure it will refresh.

Fair enough, thanks. I actually do when I can. And/or append random ?ver={GUID} parameters. But sometimes I cannot and would like to change the cache-control header when these are sent. Can it be set?