473,382 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Different Content-type: headers, Firefox and IE


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.
Feb 5 '07 #1
3 9562
On 5 Feb, 18:53, timothy <tschaef...@acesoft.comwrote:
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.

Feb 5 '07 #2
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/>.
Feb 6 '07 #3
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.
Feb 6 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Cram TeXeD | last post by:
Hello everybody Could I enclose different namespace. My concern is : On one hand, I have this stuff <tr:transaction xmlns:tr="http://myhome.sweethome.org/transaction" attr1="blabla" attr2...
6
by: Pasi Kovanen | last post by:
How do I define for example link inside H1 style to be of different color than other links in the same page: <a href="blah">this is some color</a> <h1><a href="blahblah">this is different...
2
by: name | last post by:
The piece of code is for a Web Form Page. Who can tell me why? Thanks a lot! ------------------------------------------------ VB.Net Code: Protected Overrides Sub AddParsedSubObject(ByVal obj As...
2
by: Sara T. | last post by:
How can I config to send the content-encoding to the different browser ? I know it can config in Web.config (globalization section) like this: <globalization requestEncoding="utf-8"...
4
by: Mark | last post by:
Hi... Just noticed something odd... In old ASP if you had query parameters that were invalid for their encoding (broken utf-8, say), ASP would give you back chars representing the 8-bit byte...
61
by: phil-news-nospam | last post by:
Why does SVG need a different tag than other images? IMHO, SVG should be implemented as an image type just like any other image type, allowing it to work with <img> tags, and ... here is the...
7
by: Tristán White | last post by:
Hi there, this'll be an easy one I'm sure. I have a small question that will take a second to answer, I am sure. If you go to http://snipurl.com/t821 All the buttons on the left are red, and...
28
by: timhaynes1985 | last post by:
Hi, I am very new to PHP so please go easy on me. I have a page with 2 divs next to each other, a menu in the left and content in the right. Now what I want to know, is it possible to chenge...
1
by: yawnmoth | last post by:
<?php $content = ' <a> <d> <b> <c/><c/> </b> </d> <b> <c/><c/><c/>
4
by: sandeepsangshetty | last post by:
Hi friends, I designed one master page in my application. Here i am stuck up with hiding the content for the different users login. If the login user is Admin he needs to see some content and...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.