I'm making a website where users select one of the four options - A, B, C, or D (for simplicity) and press a button to be redirected to a different page (page 2) that uses the selection to display one of the four images at the top.
The selection is stored in a text file using PHP.
Page 2 will read the text file and display the picture based on the value read.
The problem is if the user had previously chosen option A and then presses the back button and chooses option C, the first time Page 2 loads, it will still display the picture for option A. Only after refreshing the page once it will load the correct picture for option C.
I tried to prevent IE from caching the page.. but it was no use.
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE" /> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1">
Note: The website only has to work in IE so no need to make it compatible with other browsers...
Anyone know what am I doing wrong here? Or how to prevent the browser from remembering the previous information?