Caching Problem

Discussion in 'ASP General' started by CJM, Sep 29, 2004.

  1. CJM

    CJM Guest

    I have an application that I'm developing that generates a PDF from an HTML
    page. The quotation.htm page is generated manually, but will be automated in
    the finished version. It is processed in PDFTest.asp using an off-the-shelf
    PDF component, which creates Test.pdf.

    I am having problems with caching: if I change the content of the html page,
    it is generally not being reflected in the finished PDF.

    I've modified the HTTP Headers (in IIS) to 'Expire Immediately' for the
    whole Virtual Directory; I've include 'Response.Expires = 0' in PDFTest.asp;
    and I've even converted the original HTML file into ASP (with
    Response.Expires = 0 add in).

    I havent pinned down the conditions under which the correct result is
    achieved. But generally, if I edit the quotation.asp/.htm file, and then
    call the PDFTest file, the PDFTest file will pick up the old ASP/HTML file
    and render it as a PDF. I've confirmed this by deleting the resulting PDF
    file and it is created again each time. Likewise, the URL of the ASP/HTML
    file is hard-coded into PDFTest - if I enter this value in a browser, the
    correct page is rendered.

    On the other hand, would have expected everything to work if I cleared out
    IE cache, but it doesnt. Does this mean the page is being incorrectly cached
    in IIS?

    [This is running on my development machine: XPSP2, IIS5.1]

    Thanks

    Chris
     
    CJM, Sep 29, 2004
    #1
    1. Advertising

  2. Try this:-
    http://www.aspfaq.com/show.asp?id=2022
    It mght help, it seems to work for me.
    Stu

    "CJM" <> wrote in message
    news:...
    > I have an application that I'm developing that generates a PDF from an

    HTML
    > page. The quotation.htm page is generated manually, but will be automated

    in
    > the finished version. It is processed in PDFTest.asp using an

    off-the-shelf
    > PDF component, which creates Test.pdf.
    >
    > I am having problems with caching: if I change the content of the html

    page,
    > it is generally not being reflected in the finished PDF.
    >
    > I've modified the HTTP Headers (in IIS) to 'Expire Immediately' for the
    > whole Virtual Directory; I've include 'Response.Expires = 0' in

    PDFTest.asp;
    > and I've even converted the original HTML file into ASP (with
    > Response.Expires = 0 add in).
    >
    > I havent pinned down the conditions under which the correct result is
    > achieved. But generally, if I edit the quotation.asp/.htm file, and then
    > call the PDFTest file, the PDFTest file will pick up the old ASP/HTML file
    > and render it as a PDF. I've confirmed this by deleting the resulting PDF
    > file and it is created again each time. Likewise, the URL of the ASP/HTML
    > file is hard-coded into PDFTest - if I enter this value in a browser, the
    > correct page is rendered.
    >
    > On the other hand, would have expected everything to work if I cleared out
    > IE cache, but it doesnt. Does this mean the page is being incorrectly

    cached
    > in IIS?
    >
    > [This is running on my development machine: XPSP2, IIS5.1]
    >
    > Thanks
    >
    > Chris
    >
    >
     
    Stuart Palmer, Sep 29, 2004
    #2
    1. Advertising

  3. CJM

    CJM Guest

    Thanks Stuart.

    After a bit of further investigation, I've pinned down the problem to a PDF
    component I'm experimenting with.

    AFAIK IIS is behaving correctly, but the PDF component isn't; it's supposed
    to render a page, determined by the URL you give it, and render it as a PDF.
    However, it seems that if we change the page, IE/FF will render the updated
    page correctly, but the PDF component looks at an old copy somewhere.

    I've contacted the publishers, but regardless, it's not an ASP/IIS problem
    so this thread can close.

    Thanks

    Chris


    "Stuart Palmer" <> wrote in message
    news:...
    > Try this:-
    > http://www.aspfaq.com/show.asp?id=2022
    > It mght help, it seems to work for me.
    > Stu
    >
     
    CJM, Sep 29, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joe Reazor
    Replies:
    2
    Views:
    542
    Yan-Hong Huang[MSFT]
    Jul 21, 2003
  2. Paul M. Frazier, Ph.D.

    Page Caching Problem

    Paul M. Frazier, Ph.D., Jul 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    405
    Khan Imran
    Jul 28, 2003
  3. Hypo
    Replies:
    6
    Views:
    448
  4. Troy Simpson

    Fragment Caching inside page caching?

    Troy Simpson, Jan 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    815
    Troy Simpson
    Jan 19, 2004
  5. JimLad
    Replies:
    3
    Views:
    934
    JimLad
    Jan 21, 2010
Loading...

Share This Page