Forum Moderators: coopster

Message Too Old, No Replies

page keeps caching old data, how to fix?

         

Wozzzzza

12:36 am on Dec 5, 2005 (gmt 0)



i have a php page that has a series of check boxes in it and you press the update button after unticking some boxes and ticking others. after the page updates the changes actually take place in the database but the page displays the old state where it was before you ticked and unticked the boxes. as soon as you press Ctrl + F5 it actually updates the page to what is in the database.

how can i fix this so when i press the update button it refreshes and doesnt cache the old state?

i have the following in the header but it dont seem to work, is there anything else i need to do?

<meta http-equiv="pragma" content="no-cache">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

Wozzzzza

3:11 am on Dec 6, 2005 (gmt 0)



anyone?

jatar_k

5:19 am on Dec 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I have had this problem with certain computers, one in particular gave me fits

the pragma no-cache worked for most of them, the rest I just forgot about them.

I have seen this mainly in IE and it gets worse as the cache becomes full, eventually you can't refresh the page at all, it just keeps giving you the old one.

Wozzzzza

5:43 am on Dec 6, 2005 (gmt 0)



of course, its a microsoft product. hello firefox here i come.