session cookie forgotten by backbutton in 3 of 5 browsers
This simple cookie page,
attempts to keep a simple numerical value stored for one browser session, if a user goes forward to a page(contact in the example), and then back to the page above by back button.
Chrome and IE8 are putting the number into a form input, as planned.
Opera 9.6, Safari 3.2.3 for Windoes, and Firefox 9.0.1 forget the cookie's value, unless the page is refreshed.
Is there a better way to help all browsers remember the value I'm hoping to send back to a Perl script, for users who keep using the back button?
I'm not sure if it works, but try add these meta in the Head of the html document, to prevent browsers cache the page.
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache-control" content="no-store">
<meta http-equiv="Expires" content="-1">
Thanks for the meta tags.
I pasted them in to the head of the page, but Firefox, Opera, and Safari still seem to forget the cookie value after going forward to abc.htm, unless the myCookie.htm page is refreshed.
Problem seems to have been solved for Firefox, Opera, and Safari for Windows.
A variable z inside the script tags was assigned a value of 0, and
an unload event was added to the body tag:
From the backbutton, Firefox, Opera, and Safari seen to go back to the exact state of the page as the page was after finishing loading.
Using an unload event seems to persuade those 3 browsers, and hopefully others, to go back to the earlier page state.
Chrome and Internet Explorer seem to go back to earlier page states without an unload event.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)