Is there a way to stop the browser caching a downloaded file.
The file is a .xls (Excel) file and is updated regularly during the session. It's part of an ASP application and the user gets a distinct file name for the session.
The problem is that when the user clicks on the link the browser doesn't download the file, it just gets it from cache.
The link looks like this:
<a TITLE="Show results in Excel" HREF="<%=Session("UserFile")%>"><img SRC="../images/toexcel.gif" HEGHT="35" WIDTH="36" BORDER="1"></a>
Session("UserFile") = ../Excel/WD245365367.xls
the number is the Session.SessionId value.
I've tried using:
<meta http-equiv=pragma content=no-cache>
on the page that contains the link but that only stops the page from caching not the file.
I need to use the same filename all the time because when the session ends I want to delete it, otherwise the files would build up on the server.