ASP.NET: How to Prevent Browser Page Caching and Successfully Expire Content
Page and Cache expiration on IIS is sometimes not completely obvious. One common problem is that certain browsers (in our case IE), seem to be more prone than others, to cache pages indefinitely, especially when they are configured with their default installation settings.
When we were working on an AJAX JSON webservice page recently, IE kept caching the old responses, and the UI was behaving erratically.
With this code snippet placed in the OnInit event of the page, it solved all of the caching problems we encountered.