DelphiFAQ Home Search:

Can I disable the Refresh button in Internet Explorer

 

comments14 comments. Current rating: 4 stars (6 votes). Leave comments and/ or rate it.

Question:

Is it possible to disable the Refresh button in Internet Explorer?

Answer:

To our best knowledge, this is not possible.


Comments:

2005-11-28, 03:49:21
anonymous from India  
why why why why ??????????????????
2006-01-05, 04:11:17
anonymous from Netherlands  
rating
Of course it is!

function KeyCache() {
if (window.event && window.event.keyCode == 116) {
window.event.keyCode = 123; //Replaces with F12 button. (Does nothing in IE)
}
}
document.onkeydown=KeyCache()
2006-02-01, 04:02:26
anonymous from India  
rating
Event type load is fired when a page loads. This may also be useful when the refresh button on the menu is clicked.
2006-05-19, 03:11:26
anonymous from India  
rating
2006-08-12, 03:05:58
myfriendhari@rediffmail.com from India  
rating
I hope this will help full
just write this code in between <head> ... </head>

<script language='javascript'>
var a=0;
function refresh()
{
    if (116==event.keyCode)
    return false;
}

document.onkeydown = function (){ refresh(); }

function logout()
{
// write ur code.....
}
window.onunload = function(){
if(a==116)
{
a=0;
return;
}
else if(event.clientX>0 && event.clientY<0)
return;
else if(event.clientX<0 && event.clientY<0)
logout();
}

</script>

contact me : myfriendhari@rediffmail.com
2006-11-19, 10:34:36
anonymous from United Kingdom  
where is refresh button in ie 7
2007-01-09, 02:53:34
anonymous from India  
In IE7, refresh button is right next to url bar (with arrow icon) jus to left of stop button. (with X icon)
2007-03-16, 01:37:31
[hidden] from South Africa  
rating
Where/How does 'a' get it's value to be able to be 116?

window.onunload = function(){
if(a==116)
{
a=0;
return;
}
2007-07-24, 23:16:49
anonymous from New Delhi, India  
pls help me for to disable refresh button ...
2007-10-23, 02:50:56
anonymous from Philippines  
im still confuse i have use this code:
<script language='javascript'>
var a=0;
function refresh()
{
if (116==event.keyCode)
return false;
}

document.onkeydown = function (){ refresh(); }

function logout()
{
// write ur code.....
}
window.onunload = function(){
if(a==116)
{
a=0;
return;
}
else if(event.clientX>0 && event.clientY<0)
return;
else if(event.clientX<0 && event.clientY<0)
logout();
}

</script>

between the head but it wasnt working what cud be the problem then,
2007-10-27, 02:25:17
anonymous from Pakistan  

<script language='javascript'>
function document.onkeydown()
{
if ( event.keyCode==116)
{
event.keyCode = 0;
event.cancelBubble = true;
return false;
}
}
</script>


Try it
2008-01-02, 00:24:12
anonymous from United States  
rating
But this code doesnt' stop the refresh button on the browser... only on the keyboard.
2008-01-10, 02:20:54
anonymous from Singapore  
1
2008-04-29, 03:15:29
anonymous from United Kingdom  
yes you are right

 

 

Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option.
 
It seems that you are
from Washington, US .

Info/ Feedback on this

Show city and country
Show country only
Hide my location
Leave your comment here:
Please type in the code:
photo Add a picture:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity. The owner of this web site reserves the right to delete such material.