You are here: Issue with cache and pictures « PHP Programming Language « IT news, forums, messages
Issue with cache and pictures

Posted by Jaak on 01/02/06 18:00

I have a problem with cached images...

The script first creates some pictures out of avariable source (every time
the script runs the pics are different):

$im = imagecreatefromjpeg($file);
imagejpeg($im2,"temp100.jpg",100);
imagejpeg($im2,"temp75.jpg",75);
imagejpeg($im2,"temp50.jpg",50);
imagejpeg($im2,"temp25.jpg",25);

then I show them using normal html img tags

<img src="temp100.jpg">

The problem is that the pictures are cached and the script/IE shows a
fautlhy version of the pictures.

I tried messing with the header as described in the php manual.

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

But this doesn't work... wrong pic-fileversion

Does anybody has a sollution?

Thanks
KJ

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация