Randy Webb wrote:
Paul said the following on 1/10/2007 8:12 PM:
Randy Webb wrote:
Flarky said the following on 1/10/2007 5:28 PM:
Hi all,
I have a page that has links to other pages.
I want to be able to detect when the user has clicked
on Back (or typed Backspace) to move back to my page.
Is this possible?
No.
rather uncreative
But 100% true none the less
Not 100% but,
The solution you call "creative" *might* be 10% reliable.
Haven't done this in a while but, experience showed 95% when the QA
dept checked with Win95/98/ME/2K/NT with IE4,5,5.5 NS4,4.5,4.7,6 Opera
5,6,7; Mac OS7,8,8.5,9 w/ IE and NS
Assumes script enabled of course.
you could have pages add navigation tracking to a (session) cookie.
It won't read the cookie on page load via the Back button.
Actually, yes, it can.
var rawCookie = document.cookie;
>
Even when reading, its not 100% that the user simply hit back,
That's providing it even reads the cookie 10% of the time.
With JS enabled, there is little prob reading a cookie, even if the
page came out of the cache.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/