Make bfcache in Internet Explorer work like Firefox

I have the opposite problem of the accepted answer to this question: Ajax, back button and DOM updates

There, most people wanted Firefox to trigger the unload event when they returned to the page using the back button.

We manipulate the divs that are shown / hidden (moving around the tree) and go to another page. When you click "Back", Firefox uses its bfcache and displays the page as it was when you left (this is good). IE shows the page in its original state (this is bad). We want IE to behave like firefox and use its bfcache, are there any tricks to get this done?

(we do not use jQuery)

+6
source share
1 answer

I found a similar question :( Differences in Internet Explorer and Firefox when dynamically loading content, and then forward and backward ). The answer is that you can trick the IE history of the mechanism for saving the modified dom using a lot of javascript to overwrite the document or put the values ​​you want to save in hidden input fields. Anything better?

+4
source

Source: https://habr.com/ru/post/899633/


All Articles