This is probably more of an HTML question than PHP. Perhaps someone
here can answer or point me to a proper newsgroup.
How can I force the browser to reload an image from the server?
I have a page where the user can set some parameters and click a
<submit> button. A PHP script then generates a .png graphic and saves
it to disc. An html statement (<p><img src="gMyGraphic .png"></p>) then
sends the graphic out to the browser.
This works as expected - the first time. But when the user modifies a
parameter and re-submits the page, the modified graphic does not get
sent to the browser. I know the graphic is being updated - I can look
at it on the server's hard drive (and I'm displaying some other
information on the page that indicates it's been updated).
If I "refresh" the page in the browser, then the modified graphic IS
displayed.
It appears that the browser is using a cached copy of the graphic -
even though I've told it not to cache anything. The page includes the
following statements:
<META HTTP-EQUIV="expires" CONTENT="Wed, 09 Aug 2000 08:21:57 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
here can answer or point me to a proper newsgroup.
How can I force the browser to reload an image from the server?
I have a page where the user can set some parameters and click a
<submit> button. A PHP script then generates a .png graphic and saves
it to disc. An html statement (<p><img src="gMyGraphic .png"></p>) then
sends the graphic out to the browser.
This works as expected - the first time. But when the user modifies a
parameter and re-submits the page, the modified graphic does not get
sent to the browser. I know the graphic is being updated - I can look
at it on the server's hard drive (and I'm displaying some other
information on the page that indicates it's been updated).
If I "refresh" the page in the browser, then the modified graphic IS
displayed.
It appears that the browser is using a cached copy of the graphic -
even though I've told it not to cache anything. The page includes the
following statements:
<META HTTP-EQUIV="expires" CONTENT="Wed, 09 Aug 2000 08:21:57 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
Comment