Jump to content

How to disable F5?


multiraj00

Recommended Posts

It is pretty much "against the rules" to disable browser functions from a user. There probably is a better solution, but in order to find it we need to know why you want to disable refreshing.

Link to comment
Share on other sites

i have used java script for timer and it is working.but the problem is all refreshing option is disable in only IE.when i'm using advance browser like chrome and FF thenright click and address bar is only disable not F5 button. can you give me solution of this problem in JS?? thanks in advance :)

Link to comment
Share on other sites

No. There simply is no way you can completely prevent a refresh. If users want to disrupt your results by refreshing, they can always do that from some place in the browser. Even in IE - a user can always just hit "Enter" while they're at the address bar, and cause a refresh that way. JavaScript doesn't have access to any events outside the page itself, so it can't stop that.The ONLY way you can keep your timer correct is by making your server issue the initial time when the page is first opened, and keep serving that start time until the test is over. That way, refresh or no refresh, the timer will be from a common point in time.

Link to comment
Share on other sites

In IE, have you tried the "click on the address bar & click Enter" trick I mentioned? Does it not work even then? Can I have a link to the web page please?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...