session cookie forgotten by backbutton in 3 of 5 browsers
This simple cookie page, http://superfly.co.nz/myCookie.htm
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?
Thanks.
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:
<body onunload="javascript:z=1">
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.
Bookmarks