Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


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

Dynamic <IMG>



On Wed, 16 Aug 2000, Ron Peterson wrote:

> > print ("Content-type:  image/png\n\n");
> > ...{send image}
> 
> I'd better confirm that this was indeed the problem before my inbox
> explodes.  :-)  I was under the mistaken impression that you only did
> this when you wanted to send an image to a browser naked and alone.
> 

Every image gets sent to the browser naked and alone, as every image is
returned after an individual GET request.

> So things work now, but not really.  Now I have to figure out why even
> dynamically generated images get cached by the browser, and what do I do
> about it.  Bleh.
> 

If you're setting your own headers, a variety of things. 

1) Have the script return 201 (Created) instead of 200 (OK)

2) Set the headers:

Expires: <some date>
Last-Modified: <some date (current to defeat cache)>
Cache-Control: no-cache

Of course, no solution works for every agent. See the RFC and try and
cover yer ass:

http://www.w3.org/Protocols/rfc2068/rfc2068

Good luck! ;)

--
Niall Kavanagh, niall at kst.com
News, articles, and resources for web professionals and developers:
http://www.kst.com

-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org