Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to disable the back button on the browser using jscript?

Status
Not open for further replies.

gd69

Programmer
Jul 3, 2003
3
IN
i've noticed that many websites compromise on security.one such security issue is that once a user log's out of his account,he can still view the previous page by clicking on the back button of the browser as the page will load from the cache.....not the server. the user mat not be able to click on any links,etc. but he can atleast view the page.i have disabled the caching of pages so that every page will be loaded from the server but this is not a good solution! if anyone can help me out with the jscript code to disable the back button......once the user log's out,then i could enable caching of the web pages and yet have security!help.......anybody!
 
You can't disable the back button, just like you can't disable the file menu. You can however either manipulate the history object to effectively render the back button useless, or close the window - thereby rendering the whole history a moot point.
 
thanks for the advice dwarfthrower.......but i'm a beginner!if u could give me the code as to how can i render the history to moot point even if the user has not closed to window?any suggestions will be highly appreciated!
thankx a million pal!
awaiting ur reply!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top