Groups | Blog | Home
all groups > inetserver asp general > september 2004 >

inetserver asp general : Caching Problem


CJM
9/29/2004 1:09:46 PM
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
9/29/2004 1:31:08 PM
Try this:-
http://www.aspfaq.com/show.asp?id=2022
It mght help, it seems to work for me.
Stu

[quoted text, click to view]

CJM
9/29/2004 5:35:06 PM
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


[quoted text, click to view]

AddThis Social Bookmark Button