Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
no-cache for temporary files
#1
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.


Attached Files Thumbnail(s)
   
Reply
#2
We cant see the image. Please save it as a file and then attach it.
Reply
#3
(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...
Reply
#4
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.
Reply
#5
(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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)