Cache ...

  • Thread starter Thread starter Neven Klofutar
  • Start date Start date
N

Neven Klofutar

Hi,

How can I tell IE not to cache something ...

Every time I access a page I create PDF file, and the I open it ...

*******************
private void Page_Load(object sender, System.EventArgs e) {
CreatePDF();
lblInfo.Text = "<script>window.location='something.pdf'</script>";
}
*******************

Evey time I open this PDF, I have to refresh IE in order to view the latest
version of PDF ...

Any sugestions ?

thanx, Neven
 
Response.Cache.SetCacheability(HttpCacheability.NoCache)

in the page load should do it.
 
I just add a random query parameter to the url, for example

'something.pdf?' + (new Date()).getMilliseconds()

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top