Handle cached images? How do I force the browser to show the new version?
Hello,
When a web page with an image (img_01.jpg) is loaded, the image will be cached by the browser. Let's say we update img_01.jpg and save it with the same name, when visiting the same page from the cache, the old image will be shown.
How should I handle this in ASP.NET MVC?
I know that in regular ASP.NET (no MVC) an additional component needed to be created and that component would add a random number to the end of the filename. How do I do this in ASP.NET MVC?
BestRegards
+1
source to share
3 answers
You can use HTTP image handlers to add expiration headers. But it mostly depends on the browser if the expiration headers are used correctly. Does it help?
+1
source to share