Topic: Disabling Cache (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: |
![]() Is it possible to disable the caching of a certain webpage. I have an image that is pulled from the server that displays a unique PIN that my customers are required to write down. The only problem I have is that this image is cached so when they purchase a second product after some time the same image is displayed and not a new one. Does anyone have any suggestions for this problem? |
Maniac (V) Mad Scientist with Finglongers From: Germany |
![]() Yes. Send the appropriate headers. that basically 'don't cache, must refresh every time, expired three weeks ago'. |
Nervous Wreck (II) Inmate From: |
![]() I used the following code, but in OSCommerce I receive the error: quote:
quote:
code: <?php print "<img src='yourfile.jpg?".time()."'>"; ?>
|
Paranoid (IV) Inmate From: cell 3736 |
![]() The header() functions must be the absolute first thing in the file (before includes etc) or otherwise they may not work and this also means that they can't be in one of the included files at least this is the safest way to go about it. |
Maniac (V) Mad Scientist with Finglongers From: Germany |
![]() quote:
|
Nervous Wreck (II) Inmate From: |
![]() quote:
|
Nervous Wreck (II) Inmate From: |
![]() I know that it has been a while since I have visited this thread, but this problem still exists for me. I went about trying to set a no-cache just on the image, but this didn't work either: code: <img src="myimage.png?<?php echo filemtime('myimage.png') ?>">
|