In article <3F**************@oracle.com>, "Jeyaprakash(CK) Chittu"
<CK************@oracle.com> writes:
Hi
I have couple of pages that maintain some stateful information and i
need to detect browser back button press and refetch the page in order
to show the current values on the fields. Is there a simple mechanims
thru JS.
No. Javascript has no way of knowing if I click on the Back button. It can only
know that I am leaving/have left the page, but not how I left it.
If you are trying to track data, then you need to approach it differently. Any
JS approach will fail when its disabled/not available.
The only way that I know of, that will ensure a reload, is to make the URL
unique each time. The simplest way to do that is to append the current time to
the page, and then check it when the page loads. If its over XXX milliseconds
old, then redirect it back to itself, with the new time appended.
--
Randy