Dynamic <IMG>
Niall Kavanagh
niall at kst.com
Thu Aug 17 09:00:52 EDT 2000
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).
More information about the Discuss
mailing list