简体   繁体   中英

Button Back in Browser with Frames (history forward don't work)

I have jsp aplication. I want, that button Back don't work. history.forward - not suitable, that transitions occur in frame. In Google chrome when I go in my jsp aplication create history transitions in frame, and button Back becomes active. I need disable button Back or when button back is pressed - nothing happened. Open new windows without toolbar - ot suitable. history.forward - good work if simple internet page. In jsp project with frames hi does not behave predictably. I need, than it wark in google chrome and IE (maby can write individually to each his own)

How do it?

You can't disable the browser's back button. The best you can do is write your application so that using the back burron doesn't break anything.

Try this code

<body onload="onLoad();" onpageshow="if (event.persisted) onLoad();"> 

because Firefox 1.5 uses in-memory caching for entire Web pages, including their JavaScript states, for a single browser session. Going backward and forward between visited pages requires no page loading and the JavaScript states are preserved.

Click here for your reference

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM