how to detect the page has refreshed??
When the page is refresh, it will first call window_unload() and
then call window_load(). The problem is I window_unload() is
invoked when the user click close button, or right top icon close
button. I don't want refresh will call window_unload. Any ideas?
<BODY ONLOAD="window_load()" ONUNLOAD="window_unload()">
Re: how to detect the page has refreshed??
> When the page is refresh, it will first call window_unload()
> and then call window_load(). The problem is I window_unload() is
> invoked when the user click close button, or right top icon
> close button. I don't want refresh will call window_unload. Any
> ideas? thanks!!
You have neglected to say why you want to do this.
The unload event is called whenever a page is unloaded for any reason
(except on the browsers that do not bother to call it when the browser
is closed). The only way of attributing a reason for the unload is when
it is the direct result of an action initiated within the document
(navigation, form submission). However, there is an extensive list of
user actions that will result in a page unloading, including closing
down the browser and refreshing the page, and no way of knowing which of
them applies to any given unload.
Almost any design that called for an interest in the distinction between
refreshing a page and closing a browser window would be unsuitable for
use over HTTP (as it is a stateless protocol).
|All times are GMT. The time now is 08:33 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.