You are here: Re: HTML problem with refreshing the browser's display of an image « HTML « IT news, forums, messages
Re: HTML problem with refreshing the browser's display of an image

Posted by Jonathan N. Little on 01/25/08 22:35

Edward Diener wrote:
> Neredbojias wrote:
>> Well bust mah britches and call me cheeky, on Fri, 25 Jan 2008
>> 18:20:08 GMT Edward Diener scribed:
>>
>>> I am working on a web application which programatically changes an
>>> image on the server side ( via ImageMagick ) on the roundtrip between
>>> client and server. When the web page, in which the img tag resides,
>>> is redisplayed, I need Firefox to reread the web page in order to
>>> redisplay the image correctly rather than take the image from its cache.
>>
>> What is the filename of your page? Is the extension .php?
>>
>> Test: try using sessions.
>>
>
> Meaningless !


Serve image with PHP and use header() function

<?php
$theImage=[whatever the URL or filespec to your image];
$image=file_get_contents($theImage);

header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Content-type: image/jpg"); //whatever image type is...
echo $image;
?>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

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

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