Discussion Locked

Disable Browser Back Button

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do i disable the browser(IE5.5)back button using javascript.

8 replies

by timthetoolman

Hi,

Rather than answer your question, I'll suggest this... If you're writing some sort of application that requires a user to go through a series of screens step by step... then dont.

Essential web application design is that each page should be "stateless". This means that you must allow for a user to get to any page from anywhere and handle that correctly.

For example what's to stop someone from bookmarking a page and going back to it? Users do that kind of thing...

If you simply want to know how to disable the backspace button for interest sake... then sorry to have appeared to have lectured...

Cheers,
Tim.

by timthetoolman

Sigh... I guess I could give you an answer if you're interested...

Will wipe back history.

But I repeat... DONT DO IT. Design for it instead.

Cheers,
Tim.

by dushy_ant

U can't
Anyway there is a workaround for that
If u keep a refresh http header
and keep its value as '0' .
This will prevent the users from seeing the previously cached page

Hope this solves your problem.
All the Best

by sachinp78

Hi,
Practically you cant do that.But using the location object you can do that.e.g
****************************

disable back button
***************************
Try thiscode

This discussion is closed to new replies.