This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Disable Refresh Button In Browser

 
Bibhishan Karadkar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to Disable Refresh Button In Browser
> I can disable right click so from popup menu User cannot select Refresh
> I can Detect F5 key with key event & can Disable
Now remaining two options to user are
1) Refresh Button from Toolbar
2) Refresh option from View pooldown menu
Please can anyone help me out
Thanks ,
Bibhishan .
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Open a pop up window with out the menu bar and the tool bar.
that is the only way to do it....

If you need help with the pop up window, I have a generator on my site.
www.A1ien51.8k.com
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... but don't rely on this as a perfect solution, it is still only a work-around. If the user is used to refreshing by using keyboard commands (like I do) they will still be able to reload the page.
Dave.
 
Feign Narula
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys the only way I know is that if u want to disable the refresh button you can by using the ActiveXObject(...) and fiddling with the clients registry. I hope if there is any way in which I can mask the values in the registry temporarily on the client so that I can disable for a particular window.
As far as I know every window has a ClsId and the ActiveXObject can be called for that particular window instance and the button can be disabled. that is ms operating systems. What would happen if I am on linux or solaris. I think the story with linux and solaris would change.
The back button as I tried in jsp can be locked by calling location.replace(url) method as history.current becomes equal to history.previous.
I also think that the refresh button depends on cache so I tried the followindg code but in vain....
<%
response.setHeader("Cache-Control", "no-store") //HTTP1.1
response.setDateHeader("Expires", 0);
response.setDateHeader("Date",0);
%>
but the curren window cache cannot be empty. I am trying some new methods as well. If I am successful I will do inform you.

Feign
feign_narula@hotmail.com
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
only way to block it is to expire the page as said before....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic