refresh the page
Posted: Thu Oct 13, 2005 4:29 pm
how to restrict the user from refreshing the page
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
/**
* Disables page refreshing.
*/
function kill_page_refresh(e) {
if (window.event) {
if (event.keyCode==116||(event.keyCode==82&&event.ctrlKey)) {
event.returnValue = false;
event.keyCode = 20;
}
}
return true;
}That leaves shift-f5, clicking the refresh button in the browser, right-clicking, and of course any plugins the user might have.foobar wrote:You can block the F5 key with the following code
You can't, and you shouldn't. Doing so removes functionality from users that they may need.rajan wrote:how to restrict the user from refreshing the page