Reputation:
I have a chat application,i want to disable the back and forward option of browser so that user cannot move back or forward.It shold be compatible in all browsers.
Upvotes: 0
Views: 50
Reputation: 1122
You cannot disable buttons belonging to the browser and you should leave your visitors the choice to use your website like they see fit.
For instance look at Facebook's chat functionality. If you chat and then navigate away from the page, the chat panel will reopen on the new panel and load the chat history again. This is a much cleaner solution and doesn't interfere with the browser's back and forward buttons.
Upvotes: 0
Reputation: 78687
Not possible. You should not try to interfere with browser features. You should instead code your application to deal with a user freely going back and forward.
Upvotes: 4