Hulk
Hulk

Reputation: 34170

html refresh properties

Is it possible that the html page loaded, cannot be refreshed or reloaded by the user

Thanks..

Upvotes: 2

Views: 149

Answers (2)

user159088
user159088

Reputation:

The onbeforeunload event could be used to detect a situation like this.

I think this is what SO uses when you write an answer and then want to leave before you post it; it asks you if you are sure.

Is that what you want to use it for or what?

Upvotes: 1

Nick Craver
Nick Craver

Reputation: 630389

No, and you shouldn't try to do this...it breaks all the users expectations of what a webpage does.

Whether it's code or behavior, when you're having trouble doing something, it's usually because it hasn't been done or hasn't been made easy...stop to ask why that is, and often you'll find there's a good reason.

Upvotes: 10

Related Questions