简体   繁体   中英

Chrome reload page after history.back

Thats makes me crazy.
I am calling details page from primary page, using, javascript - window.open("4prod.html?pkd="+idd,'_self', false); that open in the same window page with product details. When this details page has been opened there is a button "back", again in javascript - onclick="history.go(-1); return false; .

In FF works great, it means, that on "back" button from details page, the primary page appears with state as I left it, but in Chrome and IE "back" button reload primary page and all entries (inputs, color changes etc. which users have made) have gone and new - refreshed page is displayed. How I can avoid reloading in Chrome nad IE just call of cached primary page ?

This answer says it's impossible without cookies if the URL changes. Is it possible to just have the form in one <div> , then hide it (and show the details in another <div> ), then when the back button is clicked, just reverse this? If anything, (once the page has loaded the JS) the execution would be faster.

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