|
<< Click to Display Table of Contents >> Navigation: Forum > no-cache for temporary files |
02-11-2022, 03:44 AM:
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.
02-11-2022, 08:15 PM:
We cant see the image. Please save it as a file and then attach it.
02-11-2022, 11:29 PM:
(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...
02-14-2022, 05:42 AM:
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:54 AM:
(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?