Reputation: 424
In my asp.net project, I have a view-image page and an upload-image page. I upload an new image and direct to the view page, the image doesn't be changed, because IE won't reload the image if the image's url remains the same.
Any ideas? prefer the way to ask the browser to reload the image independently without server setting or web-headers changes.
Regards
Upvotes: 1
Views: 1642
Reputation: 357
Unforunately you are going to have to add these Meta Tags
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="0">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
These should force the browser not to cache anything and check for a new image every time
Upvotes: 1
Reputation: 1514
Have you considered putting a parameter after the image URL and changing that each time?
<img src="logo.jpg?rand=12345" />
Upvotes: 4