Click here to get back home

Different Content-type: headers, Firefox and IE

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Different Content-type: headers, Firefox and IE timothy 02-05-2007
Get Chitika Premium
Posted by timothy on February 5, 2007, 1:53 pm
Please log in for more thread options



My web application pushes an extemporaneous PDF file out to a web
page. It adds a 'Content-type: application/pdf' header to the HTTP
headers, but the web server automatically adds a 'Content-type:
text/html' header before mine.

Firefox embeds this in a web page just fine, but IE always brings up
the full Adobe reader application to show the file. Is this caused by
this first header? The web server gives me no way to remove it. I
could find nothing in Google but that IE has had some 'Content-type:'
problems in the past. A quick glance at the RFC revealed nothing
about how conflicting headers should be handled.

Any ideas?

Thanks,

Tim S.

Posted by Andy Dingley on February 5, 2007, 2:45 pm
Please log in for more thread options


> My web application pushes an extemporaneous PDF file out to a web
> page. It adds a 'Content-type: application/pdf' header to the HTTP
> headers, but the web server automatically adds a 'Content-type:
> text/html' header before mine.

Then fix the web app / web server. It's not hard to do this on any of
the major web scripting platforms.


Posted by David E. Ross on February 5, 2007, 7:23 pm
Please log in for more thread options


timothy wrote:
> My web application pushes an extemporaneous PDF file out to a web
> page. It adds a 'Content-type: application/pdf' header to the HTTP
> headers, but the web server automatically adds a 'Content-type:
> text/html' header before mine.
>
> Firefox embeds this in a web page just fine, but IE always brings up
> the full Adobe reader application to show the file. Is this caused by
> this first header? The web server gives me no way to remove it. I
> could find nothing in Google but that IE has had some 'Content-type:'
> problems in the past. A quick glance at the RFC revealed nothing
> about how conflicting headers should be handled.
>
> Any ideas?
>
> Thanks,
>
> Tim S.

If your Web server is Apache (and perhaps others), set the .htaccess
file to contain:
        AddType application/pdf pdf

This goes in the root of your domain; that is, for my Web site, it would
go directly in www.rossde.com, which is www.vcnet.com/~rossde. Then, it
should override what your server's default .htaccess file is doing,
which is incorrect.

You should also contact your host server's operator and request that
they correct their default .htaccess file.

--

David E. Ross
<http://www.rossde.com/>

I use SeaMonkey as my Web browser because I want
a browser that complies with Web standards. See
<http://www.mozilla.org/projects/seamonkey/>.

Posted by Harlan Messinger on February 6, 2007, 10:53 am
Please log in for more thread options


timothy wrote:
> My web application pushes an extemporaneous PDF file out to a web
> page. It adds a 'Content-type: application/pdf' header to the HTTP
> headers,

How are you doing that?

> but the web server automatically adds a 'Content-type:
> text/html' header before mine.

Similar ThreadsPosted
css and div for headers? November 12, 2007, 5:02 pm
Html Headers March 23, 2006, 10:51 pm
"MUST REPLY" HTTP response headers April 13, 2005, 2:22 am
freezing column headers with dropdowns December 15, 2005, 5:10 pm
Writing headers for an HTML only when printing July 17, 2006, 5:31 am
Help putting standard headers on all pages September 20, 2008, 8:53 pm
DIV not recognized by Firefox - It works only in IE - How to replace it for Firefox? May 8, 2007, 5:13 pm
Firefox and IE are different June 20, 2005, 3:28 am
Why does Firefox use 47 MB of RAM? December 26, 2005, 6:28 am
Firefox bug? April 1, 2008, 9:01 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap