Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I don't see any reference to .NET in your question, but I'm going to provide a related solution. Hopefully you can take from it what you need, and developers assuming your question pertains to .NET might find value in it, too.</p> <p>Here's a method I've used before to render in-browser PDFs, via HTTPS, without** caching.</p> <pre><code> private void RenderPdfToResponse(byte[] documentBytes) { Response.BufferOutput = true; Response.ClearContent(); Response.ClearHeaders(); Response.AddHeader("Cache-control", "no-store"); Response.ContentType = "application/pdf"; Response.AddHeader("Content-Length", documentBytes.Length.ToString()); Response.BinaryWrite(documentBytes); Response.Flush(); HttpContext.Current.ApplicationInstance.CompleteRequest(); } </code></pre> <p>** There is a <em>pseudo-cache</em> that occurs, just long enough for Adobe Reader to load the PDF file. I looked for a reference describing what I'm talking about, and a <a href="http://www.anetforums.com/posts.aspx?ThreadIndex=19895" rel="nofollow noreferrer">random forum thread</a> is the best I could do:</p> <blockquote> <p>IE stores the PDF in allocated 'volatile' memory and places a pointer in %system% Temp. This is the only place the file is stored. The pointer is deleted and allocated memory is freed as soon as Adobe Reader is closed.</p> </blockquote> <p>I can't vouch for the technical accuracy of that, but it does reflect what I've observed using the method above. In fact, I think that file disappears the moment it's finished loading in Adobe Reader (in the browser).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload