WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Open in new window

for

From: Simius Puer
Date: Apr 16, 2010 4:15AM


I'm with Jakob on non-HTML files opening in their native application (and
not forgetting to warn users first).

users can control whether the PDF document opens in the same window or in
> the standalone reader [Andrew K]
>

...they *can*, but how many really know *how *to do this? From experience,
not a great many, and those are usually the very web-savvy.

It seems to me that it depends on preferences they set in their own browser,
> not on how we code our links. [Cliff T]
>

...not so:

"Best of all, *prevent the browser from opening the document* in the first
place. Instead *offer users the choice to save the file on their harddisk or
to open it in its native application* (Adobe Reader for PDF, PowerPoint for
slides, etc.). Unfortunately, doing so requires a bit of technical trickery:
you have to add an extra HTTP
header<http://www.unrealtower.org/pdfdownload>;to the transmission of
the offending file. The header line to be added is
"Content-disposition: Attachment". If possible, also add ";
filename=somefile.pdf" at the end of this line, to give the browser an
explicitfilename if the user chooses to save the file." [Source:
http://www.useit.com/alertbox/open_new_windows.html]

Note that the *users right to choose is not removed*...a critical point.