• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to Disable Refresh Button In Browser

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 .
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
only way to block it is to expire the page as said before....
 
Something must be done about this. Let's start by reading this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic