output cache question

M

merrittr

This might not be the forum for this but oh well...

I have a web app that writes fields into a PDF document, it then
displays a link to this document via an anchor tag. Here is where I
get confused:
even though in the file system the PDF document gets overwritten each
time the page is traversed (i.e. each time the page is browsed to it
iterates through the session var list and writes out a new pdf) when
the page is displayed and the anchor is clicked up comes the previous
pdf doc in the adobe i.e. snap in even though in the file system it is
now replaced? I think basically the browser is caching the doc I need
to cause it to not do that any ideas.

This is what I have now:

<%@ OutputCache Duration="0" VaryByParam="None" Location="Any" %>
 
B

Bruce Barker

you are controlling the caching of the page with the anchor, but not the
caching of the actual pdf file, which is handled by iis and the users
browser settings. usually the browser is set check once a session for
updates of files.

at a performance and scaling cost, you can write up an asp.net page or
module that sets the caching headers.

a note of caution, to display a pdf file in the browser requires serveral
(2 - 6 downloads depending on browser version), so you don't want no-cache.
this is becuase the browser donloads the file, determine the mime type
requires another application to display, loads the application, then gives
the application the url, which download the file again (if cached the second
download comes from the cache).


-- bruce (sqlwork.com)
 

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

Top