I've read tons of forum posts on how to prevent caching of webforms and images on those forms and almost every post has a different solution. What's worse is I haven't yet found one that works.
I have a photo upload page that lets users upload AND make changes to uploaded jpegs. When an update is made, the image is changed but it keeps the same filename. So in IE and probably firefox, it caches the old images and you have to hit refresh to see
the changes. Aside from obviously not being user friendly, the problem is it tries to re-execute the last postback event when you hit refresh.
So, can someone tell me the correct, tried and true way, to prevent either the caching of the entire form, or at least the images on the form? Thanks!
xr280xr
Member
415 Points
290 Posts
Prevent Caching Correctly?
Nov 16, 2006 07:39 PM|LINK
Hi,
I've read tons of forum posts on how to prevent caching of webforms and images on those forms and almost every post has a different solution. What's worse is I haven't yet found one that works.
I have a photo upload page that lets users upload AND make changes to uploaded jpegs. When an update is made, the image is changed but it keeps the same filename. So in IE and probably firefox, it caches the old images and you have to hit refresh to see the changes. Aside from obviously not being user friendly, the problem is it tries to re-execute the last postback event when you hit refresh.
So, can someone tell me the correct, tried and true way, to prevent either the caching of the entire form, or at least the images on the form? Thanks!
Cache ASP.NET cache