NYCPHP Meetup

NYPHP.org

[nycphp-talk] Cannot show reuploaded image file on page unless manual refresh

George Webb gw.nyphp at gwprogramming.com
Mon Jan 20 18:49:22 EST 2003


Phil, I'm sure we can see the problem by looking just at the client-side,
since it sounds like an HTTP issue.  But could you show us the rest of
the source for view.php?

	Specifically, does view.php actually print out an image, i.e.
does it set Header ( 'Content-type: image/jpeg' ) or other image type?

	Or does it then do another redirect (e.g. 
Header ( 'Location: /other/path/imageNNN.jpg' )?

	If it's the latter, your no-cache magic won't apply.  You have
to do the former, or find some other way to set the no-cache stuff
for the images.  (In that case I think Apache has a directive or two
you can use to force no-cache.)

	Of course, if these images are to get repeatedly hit by the
same client, you waste bandwidth and CPU time if you keep sending the
same image (i.e. defeating the cache).  So you should harness the HTTP
caching protocol prudently.


Best, George.

George Webb



More information about the talk mailing list