Generally when serving PDF type document at my place of work, we serve them using a custom HTTP header:

header( "content-disposition: inline" );

(that's the PHP way to do it).

This works for us because we serve most of our documents as BLOBs from the database. If you're not doing that, I'm not sure my help will be any... help.

Be careful with this one, it seems to work pretty well in IE, but other browsers ignore it. Then again, other browsers generally behave better with attachments/mime-types in general.

Miles Tillinger wrote:

Just a question about how other developers handle opening documents e.g. PDF, DOC, in a new window.

At the moment I am using _blank targets.

Scenario 1: User is using IE with Word configured to open inside the IE window. When the user clicks on a link to the Word doc a new IE window opens and the doc is loaded in that window.

Scenario 2: User is using IE or another browser, but is configured to open Word doc's in Word, not in the Browser window. When the user clicks on a link to the Word doc a new Browser window open and the user either prompted to Save or Open the doc, or may even open the doc in Word automatically if the user has previously selected that option. The problem here is that the user is left with a blank Browser window.

So Scenario 1 is how I'd like it to behave in every case, but is this possible? Since I have no way of knowing how the user has their system configured I don't know whether to offer the link with a _blank target or not? Is there an accessible standard way of doing it?



The discussion list for

The discussion list for

Reply via email to