views:

18

answers:

1

Hi,

I need to redirect requests for PDFs to an html page that shows the requested pdf in a frame/iframe

My fear is that some browsers (at least IE used to do this) will hand over the request to Acrobat reader. I can imagine that Acrobat will not be too happy with an html page instead of application/pdf

Thanks for any information you might have on this. I will have access to a server where I can serve the html when a pdf is requested in the near future, but perhaps someone can already save me the trouble

Michel

A: 

If your reponse is 200 OK and you have a Content-Type: application/pdf then the display for the page, frame or iframe will get handed over to the PDF plugin.

Otherwise, e.g. if you do a redirect, then IE will handle the redirect.

Adrian Smith
In the older days, I saw on the server TWO hits per PDF, once from IE and one from Acrobat, hence my question
mplungjan
I imagine IE hits the URL to determine that there is a PDF behind the URL; then creates the Adobe plugin which itself requests the resource behind the URL in order to display it.
Adrian Smith
So I think you will need 2 URLs: One for the "PDF page" which will be HTML containing the PDF iframe (no redirect), and another for the PDF bytes which will be contained within the iframe (which might be hit twice, once by IE and once by Acrobat reader)
Adrian Smith
Yes, I will need to rewrite the URL otherwise it will nest.
mplungjan
I will accept, but need a test page to verify
mplungjan