RE: Is it possible to stop an image from being cached?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Solution 1:
> Send a header() that avoids caching (can't remember it exactly)
> Solution 2:
> Call the image like this:
> <img src="image.jpg?arandomstringhereeachtime">
> Or if you were creating it with a php script:
> <img src="image.php?img=image.jpg&arandomstringhereeachtime">

My preferred way of doing it, and making sure its reloaded each time is to
do it this way... the U variable pretty much guarantees a random string each
time its loaded.

image.jpg?".date("U")."




Regards
 

Chris Aitken
The Web Hub Designer and Programmer
Phone : 02 4648 0808
Mobile : 0411 132 075
 
-------------------------------------------------
 
Making The Web Work........ The Web Hub
http://www.thewebhub.com.au/
chris@xxxxxxxxxxxxxxxx
 
-------------------------------------------------
 
Confidentiality Statement:  
This message is intended only for the use of the Addressee and may contain 
information that is PRIVILEDGED and CONFIDENTIAL.  If you are not the 
intended recipient, dissemination of this communication is prohibited.  
If you have received this communication in error, please erase all 
copies of the message and its attachments and notify us immediately.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux