Cache ...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Neven Klofutar

    Cache ...

    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(objec t sender, System.EventArg s e) {
    CreatePDF();
    lblInfo.Text = "<script>window .location='some thing.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


  • Joseph Byrns

    #2
    Re: Cache ...

    Response.Cache. SetCacheability (HttpCacheabili ty.NoCache)

    in the page load should do it.

    "Neven Klofutar" <neven.klofutar *r.e..mo.v.e*@v ip.hr> wrote in message
    news:Otbr3MSNFH A.2592@TK2MSFTN GP10.phx.gbl...[color=blue]
    > 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(objec t sender, System.EventArg s e) {
    > CreatePDF();
    > lblInfo.Text = "<script>window .location='some thing.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
    >
    >[/color]


    Comment

    • Eliyahu Goldin

      #3
      Re: Cache ...

      I just add a random query parameter to the url, for example

      'something.pdf? ' + (new Date()).getMill iseconds()

      Eliyahu

      "Neven Klofutar" <neven.klofutar *r.e..mo.v.e*@v ip.hr> wrote in message
      news:Otbr3MSNFH A.2592@TK2MSFTN GP10.phx.gbl...[color=blue]
      > 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(objec t sender, System.EventArg s e) {
      > CreatePDF();
      > lblInfo.Text = "<script>window .location='some thing.pdf'</script>";
      > }
      > *************** ****
      >
      > Evey time I open this PDF, I have to refresh IE in order to view the[/color]
      latest[color=blue]
      > version of PDF ...
      >
      > Any sugestions ?
      >
      > thanx, Neven
      >
      >[/color]


      Comment

      Working...