You are here: prevent caching of gd image « All PHP « IT news, forums, messages
prevent caching of gd image

Posted by dave Cheseldine on 11/22/05 20:26

Hi
I want to stop a gd generated image from being cached.

It is called into index.php file as follows:

<image src =
"http://www.daveches.co.uk/importimage/importimage.php?x=$randomNumber"
alt = "battle area" usemap="#battlegrid" border="0">

(importimage4real.php contains the gd functionality that load and modify
the image).

The random number querystring in the code above is an attempt to trick
the browser into thinking the image is different from what it has in
its cache. But still it displays its cached version of the image.

I have tried every "stop caching" header I can think of in both
index.php and importimage.php, set expires to a time in the past and all
the rest. Still, refresh the browser: you get the cached, not the
latest, image (same in ie6 and Firefox). After a few minutes something
expires and you do get the latest version by Refreshing, but this is no
good for my application.

Is it possible that some settings on my hosting company's server are
overwriting any changes I can make?

dave Cheseldine

 

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

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