I have a ASP.NET web application that creates a text file report and then redirects to the file.
Response.Redirect(strFileName);
The problem is it seems that IE9 does something different in regards to caching. If I generate two reports, IE9 always displays the first one generated. I have to do a CTRL+F5 to see the updated file. This problem doesn’t occur on any other browser.
I have tried adding commands to change the caching to no avail.
Response.Cache.SetNoStore();
Response.Cache.SetCacheability(HttpCacheability.NoCache);
I would like to preserve the functionality of generating a text file for recording purposes. One solution is to dump all the information from the text file onto the page and avoid the Response.Redirect, but this seems like more of a hack than a real fix. Is there any way to force IE to reload the text file?
You could use something like version.
In that case browsers will always use last report version.