Refresh problems
Posted: Mon Feb 27, 2006 7:37 pm
Hello,
My website uses a script that lets a user upload his/her own pictures. Each user can upload to a maximum of six pictures. The pictures are named as following: userindex_pictureindex. So the fourth picture of the user identified with id 556 will be 556_4.jpg. The users can change any of thier six pictures, and it immediately gets update on thier profile. The user profile only shows thumbnails, and once those thumbnails are clicked, a full-size pic opens in a DHTML window. This presents a problem: after a picture was changed, the thumbnail get updated (once the profile is reloaded), but the full-size image gets pulled from the user's cache, hence it shows the older picture (a pic that was already replaced). The only way to circumvent that is to manually hit the browser refresh button, only then the new pics get downloaded. I put this line of code on the profile page, but it still couldn't solve the problem:
Is there some way I can block the cache, or force the browser to download the data on each loading of the page? Will ithelp the full-size pics (those technically aren't on the page, the DHTML window just shows a jpeg image). Any help is appreciated.
Thanks.
My website uses a script that lets a user upload his/her own pictures. Each user can upload to a maximum of six pictures. The pictures are named as following: userindex_pictureindex. So the fourth picture of the user identified with id 556 will be 556_4.jpg. The users can change any of thier six pictures, and it immediately gets update on thier profile. The user profile only shows thumbnails, and once those thumbnails are clicked, a full-size pic opens in a DHTML window. This presents a problem: after a picture was changed, the thumbnail get updated (once the profile is reloaded), but the full-size image gets pulled from the user's cache, hence it shows the older picture (a pic that was already replaced). The only way to circumvent that is to manually hit the browser refresh button, only then the new pics get downloaded. I put this line of code on the profile page, but it still couldn't solve the problem:
Code: Select all
echo '<meta http-equiv="no-cache">';Thanks.