If you are using Apache you could force a download for these file types instead of opening the file. When the user clicks on the link the download box will pop up.

This'd be my preference...

Cheers
James

Miles Tillinger wrote:
I don't suppose we're actually 'serving' the PDF or DOC as such, in that we only link to the file.  As we have no control over the header of the file, the user's OS will handle it however it is configured to.  Herein lies the problem...

-----Original Message-----
From: Bradley Wright [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 11, 2003 9:06 PM
To: [EMAIL PROTECTED]
Subject: Re: [WSG] OT: Opening documents in _blank window



Miles,

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?

Regards,

Miles

*****************************************************
The discussion list for http://webstandardsgroup.org/
***************************************************** 



 

    


*****************************************************
The discussion list for http://webstandardsgroup.org/
***************************************************** 

*****************************************************
The discussion list for http://webstandardsgroup.org/
***************************************************** 

  
***************************************************** The discussion list for http://webstandardsgroup.org/ *****************************************************

Reply via email to