473,396 Members | 2,039 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,396 software developers and data experts.

script-generated images and internet explorer

Hi all,

I wrote a small script that is supposed to get an image from a database and
return it to the user. The relevant part looks like this:

<?php
[...]
header('Content-type: image/jpeg');
header('Content-Disposition: inline; filename=".$image_name".);

print $image;
?>

This works fine in mozilla (and I guess netscape as well), but IE displays
the image as bitmap, regardless which instructions I send out to it. It
actually seems to decompress the jpeg back to bitmap before displaying,
because even if I try to save the file as jpeg it writes it in bitmap. I
though that these headers were pretty standard, and I am really puzzled as
to why IE doesn't take them into consideration.

Is there any way around this problem? T.I.A.

B.
Jul 17 '05 #1
3 2562
*** Bruno Carneiro da Cunha wrote/escribió (Sun, 02 Nov 2003 19:11:11 GMT):
This works fine in mozilla (and I guess netscape as well), but IE displays
the image as bitmap, regardless which instructions I send out to it. It
actually seems to decompress the jpeg back to bitmap before displaying,
because even if I try to save the file as jpeg it writes it in bitmap.


I guess it's a completely different problem. Delete Temporary Internet
Files and try again.
--
--
-- Álvaro G. Vicario - Burgos, Spain
--
Jul 17 '05 #2
Bruno Carneiro da Cunha wrote:
Hi all,

I wrote a small script that is supposed to get an image from a database and
return it to the user. The relevant part looks like this:

<?php
[...]
header('Content-type: image/jpeg');
header('Content-Disposition: inline; filename=".$image_name".);

print $image;
?>

This works fine in mozilla (and I guess netscape as well), but IE displays
the image as bitmap, regardless which instructions I send out to it. It
actually seems to decompress the jpeg back to bitmap before displaying,
because even if I try to save the file as jpeg it writes it in bitmap. I
though that these headers were pretty standard, and I am really puzzled as
to why IE doesn't take them into consideration.

Is there any way around this problem? T.I.A.

IE is very funny about things like this. It seems to selectively ignore
mime types in favour of file extensions.

Try linking to your image script as follows:
<img src="yourscript.php/image.jpg">
which sometimes helps to confuse IE into doing things properly.

Jul 17 '05 #3
Kevin Thorpe wrote:
IE is very funny about things like this. It seems to selectively ignore
mime types in favour of file extensions.


Indeed IE is broken. For anyone masochistic enough to wade through
it, Wacky Will's even written up its misbehaviour. The de rigueur
microfonts and technobabble come as standard, of course.

http://msdn.microsoft.com/workshop/n...appendix_a.asp

--
Jock
Jul 17 '05 #4

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

Similar topics

1
by: bayouprophet | last post by:
Cant get menu script to to put linked page in the same frame. I am new to Java and I am wondering what am I doing wrong? below are my java applet file, frame.html file, and my text file and one...
11
by: rajarao | last post by:
hi I want to remove the content embedded in <script> and </script> tags submitted via text box. My java script should remove the content embedded between <script> and </script> tag. my current...
3
by: P Wolpert | last post by:
This is my first post. I hope I don't sound stupid. I have a script conflict when I put two scripts on one page. Both scripts will work if I use one at a time but the menu button script will not...
8
by: Jakej | last post by:
I've been using a javascript in an html file for a banner slider, and it works as desired. But I'd like to use it on more than one page and it would be great if I could transfer the code to a .js...
23
by: Loony | last post by:
I have got a code like this in HTML section in ASP file which includes javascript file! The script works under MS IE but doesn't with Firefox! Can anybody tell me what is wrong? <HTML>...
11
by: comp.lang.php | last post by:
On one of my sites, I have a TCL CGI script that has a security hole in spite of it having effective server-side validation (the fact that it's CGI IS its security hole). The front end is a PHP...
4
by: petermichaux | last post by:
Hi, I'm hoping for a reason I'm wrong or an alternate solution... I'd like to be able to dynamically include some javascript files. This is like scriptaculous.js library but their solution is...
3
by: Water Cooler v2 | last post by:
Questions: 1. Can there be more than a single script block in a given HEAD tag? 2. Can there be more than a single script block in a given BODY tag? To test, I tried the following code. None...
2
by: bilaribilari | last post by:
Hi all, I am using Tidy (C) for parsing html pages. I encountered a page that has some script as follows: <script> .... var abc = "<script>some stuff here</" + "script>"; .... </script>
19
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.