Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why do some PDFs open in browser, while others get downloaded?

2,150 views
Skip to first unread message

Bert Hyman

unread,
Aug 21, 2010, 10:50:32 AM8/21/10
to
Windows XP Pro SP3
Firefox 3.6.8
Adobe Acrobat 9.3.3

When accessing a PDF via a URL in the normal way, sometimes they open in
a new tab (as expected), but sometimes a blank tab labeled "(Untitled)
will open and the Dowloads window will pop up showing that the file's
been saved to my download directory.

The two tests here

http://kb.mozillazine.org/Adobe_Reader#Enabling_the_browser_plugin

both show in the browser.

This file, for example

http://www.medica.com/router/default.pdf?doc=/C6/C13/CurrentPrimeSolutionsRate/Document%20Library/H2450_2185_Individual_Prime_Solution_Value_H2450-007_2010_print_9.23.09.pdf

http://tinyurl.com/36lkk7p

gets downloaded and saved.

What factors cause this different behavior?

--
Bert Hyman St. Paul, MN be...@iphouse.com

John Thompson

unread,
Aug 21, 2010, 10:08:06 PM8/21/10
to

Different MIME type designations, perhaps?

--

-John (jo...@os2.dhs.org)

Alex K.

unread,
Aug 22, 2010, 8:34:15 AM8/22/10
to
While both the medica URL you cite above, and the first test URL at the
mozillazine article:

http://www.adobe.com/products/acrobat/pdfs/acro7_matrix.pdf

contain the correct Content-Type headers (application/pdf), the
difference is a header called 'content-disposition'.

The medica.com URL contains just such a header:

content-disposition: attachement filename=x.pdf

Since it is designated as an attachment (even though it's misspelled),
it gets saved and opened with Adobe Reader, rather than in the browser.

The adobe.com URL contains no such header, so it is opened in the
browser, unless a user has configured FF otherwise.

For the curious, I used web-sniffer.net to obtain the response headers
from the various sites.

I know there is an extension available, that would produce the same
information,

Live HTTP Headers 0.16
https://addons.mozilla.org/en-US/firefox/addon/3829/

but I wouldn't use it enough to justify installing it, and
web-sniffer.net is just as easy for me to use, when I might happen to
need it.

For others, though, the extension might be more convenient.

Hope this helps.

--
Alex K.

gabor

unread,
Aug 22, 2010, 10:18:29 AM8/22/10
to
On Aug 22, 8:34 am, "Alex K." <akfro...@gmail.com> wrote:
> On 8/21/2010 10:50 AM, Bert Hyman wrote:
>
> > Windows XP Pro SP3
> > Firefox 3.6.8
> > Adobe Acrobat 9.3.3
>
> > When accessing a PDF via a URL in the normal way, sometimes they open in
> > a new tab (as expected), but sometimes a blank tab labeled "(Untitled)
> > will open and the Dowloads window will pop up showing that the file's
> > been saved to my download directory.
>
> > The two tests here
>
> >http://kb.mozillazine.org/Adobe_Reader#Enabling_the_browser_plugin
>
> > both show in the browser.
>
> > This file, for example
>
> >http://www.medica.com/router/default.pdf?doc=/C6/C13/CurrentPrimeSolu...

>
> >http://tinyurl.com/36lkk7p
>
> > gets downloaded and saved.
>
> > What factors cause this different behavior?
>
> While both the medica URL you cite above, and the first test URL at the
> mozillazine article:
>
> http://www.adobe.com/products/acrobat/pdfs/acro7_matrix.pdf
>
> contain the correct Content-Type headers (application/pdf), the
> difference is a header called 'content-disposition'.
>
> The medica.com URL contains just such a header:
>
> content-disposition:    attachement filename=x.pdf
>
> Since it is designated as an attachment (even though it's misspelled),
> it gets saved and opened with Adobe Reader, rather than in the browser.
>
> The adobe.com URL contains no such header, so it is opened in the
> browser, unless a user has configured FF otherwise.
>
> For the curious, I used web-sniffer.net to obtain the response headers
> from the various sites.
>
> I know there is an extension available, that would produce the same
> information,
>
> Live HTTP Headers  0.16https://addons.mozilla.org/en-US/firefox/addon/3829/

>
> but I wouldn't use it enough to justify installing it, and
> web-sniffer.net is just as easy for me to use, when I might happen to
> need it.
>
> For others, though, the extension might be more convenient.
>
> Hope this helps.
>
> --
> Alex K.

Getting back to the original intent of the question, is there a way to
force
acrobat documents to open in the plug-in rather than saving and
opening
directly in the Acrobat application? i.e. can the browser control
this
functionality or is it somehow forced by the website and / or Adobe?

Regards,
Gabor

Greywolf

unread,
Aug 22, 2010, 11:28:59 AM8/22/10
to
On 22/08/2010 10:18, gabor wrote:
[...]

> Getting back to the original intent of the question, is there a way to
> force
> acrobat documents to open in the plug-in rather than saving and
> opening
> directly in the Acrobat application? i.e. can the browser control
> this
> functionality or is it somehow forced by the website and / or Adobe?
>
> Regards,
> Gabor


The browser does what the website tells it to do. That's the
purpose/function of a browser. After all, the website designer wants you
to see what they've designed the website to show to you. FF add-ons can
change that behaviour, eg, NoScript by default prevents JavaScript from
running, and enables you to allow scripts selected by you to run.

You could write an add-on specifically to ignore/reinterpret "content
disposition" with reference to PDFs. There may be others who want what
you want.

HTH
wolf k.

Tarkus

unread,
Aug 22, 2010, 2:30:53 PM8/22/10
to
On 8/22/2010 7:18 AM, gabor wrote:
> Getting back to the original intent of the question, is there a way
> to force acrobat documents to open in the plug-in rather than saving
> and opening directly in the Acrobat application? i.e. can the
> browser control this functionality or is it somehow forced by the
> website and / or Adobe?

The MIME Edit extension may do what you want. I've not tried it for PDF
files, but it's worked splendidly for me for other file types.

http://space.geocities.yahoo.co.jp/gl/alice0775/view/20080912/1221150790

Don't be put off by the foreign characters. The extension is in
English. Just grab the third link, for FF up to 3.7.*.

Once installed, try adding application/pdf and set the defaults how you
want.

HTH.

»Q«

unread,
Aug 23, 2010, 12:10:29 AM8/23/10
to
In <news:SMqdnfmVwYRA8ezR...@mozilla.org>,
Tarkus <karn...@atlantabraves.net> wrote:

And in this case (the medica.com pdf), it might also help to either
remove the Content-Disposition header or replace it with

Content-Disposition: inline

--
»Q« /"\
ASCII Ribbon Campaign \ /
against html e-mail X
<http://www.asciiribbon.org/> / \

»Q«

unread,
Aug 23, 2010, 12:04:37 AM8/23/10
to
In <news:qKudnVCDz_ug3-zR...@mozilla.org>,
Greywolf <wek...@sympatico.ca> wrote:

> The browser does what the website tells it to do. That's the
> purpose/function of a browser. After all, the website designer wants
> you to see what they've designed the website to show to you.

Usually, that's right. In this case, the web author screwed up the
disposition header (as Alex K. pointed out), and when Fx encounters
garbage it falls back to the default for binary stuff, which is to
download instead of trying to display in the browser.

Bert Hyman

unread,
Aug 23, 2010, 10:50:49 AM8/23/10
to
In news:20100822230...@bellgrove.remarqs.net
=?UTF-8?B?wrtRwqs=?= <box...@gmx.net> wrote:

> In <news:qKudnVCDz_ug3-zR...@mozilla.org>,
> Greywolf <wek...@sympatico.ca> wrote:
>
>> The browser does what the website tells it to do. That's the
>> purpose/function of a browser. After all, the website designer wants
>> you to see what they've designed the website to show to you.
>
> Usually, that's right. In this case, the web author screwed up the
> disposition header (as Alex K. pointed out), and when Fx encounters
> garbage it falls back to the default for binary stuff, which is to
> download instead of trying to display in the browser.

Thanks to everybody for the information.

I thought briefly about whining to the Web admin at the site I
mentioned, but it's probably pointless. Besides, the same thing happens
at lots of other sites, and I have better (or at least other) things to
do.

Tarkus

unread,
Aug 23, 2010, 12:15:41 PM8/23/10
to
On 8/23/2010 7:50 AM, Bert Hyman wrote:
> Thanks to everybody for the information.
>
> I thought briefly about whining to the Web admin at the site I
> mentioned, but it's probably pointless. Besides, the same thing happens
> at lots of other sites, and I have better (or at least other) things to
> do.

The MIME Edit extension I suggested works globally. You don't have to
worry about other sites, once you've set it up.

0 new messages