If you force a user to save the file locally instead of opening it in the manner in which their browser is set up to handle it you're taking away their control of default behaviours. I really recommend against this. Let the browser handle it. If they have only the Acrobat Reader, a PDF will (generally) open within the browser. If they want to set it up differently to open in Acrobat itself, they can change their setup.
 
I have all these types of things set as I want them. I want to open Word and Excel files within the browser. If you force me to save it you're taking my preference away and I get really cranky. Then I have to remember where I saved it and clean it up later, rather than it being a temporary internet file that is purged automatically.
 
Whenever a client asks me to force people to save things I talk them out of it.
 
Just my thoughts.
 
P

From: Taco Fleur [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 12:12 PM
To: [EMAIL PROTECTED]
Subject: RE: [WSG] OT: Opening documents in _blank window

Any more info on this?
Doesn't it work the same as sending proper headers?
-----Original Message-----
From: James Ellis [mailto:[EMAIL PROTECTED]
Sent: Friday, 12 December 2003 11:04 AM
To: [EMAIL PROTECTED]
Subject: Re: [WSG] OT: Opening documents in _blank window

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