internet-explorer | Dmytro Shteflyuk's Home https://kpumuk.info In my blog I'll try to describe about interesting technologies, my discovery in IT and some useful things about programming. Mon, 07 Sep 2015 23:25:45 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 Why does IE save pictures from the Web in bitmap format? https://kpumuk.info/php/ie-save-pictures-bmp/ https://kpumuk.info/php/ie-save-pictures-bmp/#comments Wed, 18 Jan 2006 12:46:17 +0000 http://kpumuk.info/php/ie-save-pictures-bmp/ Today I found very strange problem with Internet Explorer. I’ve generated GIF-image with PHP GD2 and sent results for client browser. In IE I’ve tried to store picture in my local file system but the only option was to save the picture as a .BMP file instead of as a native .gif file! The same […]

The post Why does IE save pictures from the Web in bitmap format? first appeared on Dmytro Shteflyuk's Home.]]>
Today I found very strange problem with Internet Explorer. I’ve generated GIF-image with PHP GD2 and sent results for client browser. In IE I’ve tried to store picture in my local file system but the only option was to save the picture as a .BMP file instead of as a native .gif file! The same problem is described in Microsoft Knowledge Base, but it does not help me.

Then I start playing with PHP and headers and discover very nice gizmo: bug became apparent only when my PHP-script uses session_start(). But I needed sessions! Solution was very simple: it was necessary to add following lines before image output:

1
2
3
header("Cache-Control:");
header("Pragma:");
header("Set-Cookie:");

These lines will clear all headers sent by session_start() function and IE will understand that your the image is in right format.

The post Why does IE save pictures from the Web in bitmap format? first appeared on Dmytro Shteflyuk's Home.]]>
https://kpumuk.info/php/ie-save-pictures-bmp/feed/ 7