Preserve dynamically changed HTML on back button

前端 未结 5 2019
忘掉有多难
忘掉有多难 2020-12-04 09:31

It\'s amazing, I constantly see this working in other sites but never in sites that I\'m working on.

I\'m bringing in new content with ajax, I know about history.js

5条回答
  •  情歌与酒
    2020-12-04 09:57

    I think that reason can be that other webpages uses some back-end servers that provide session.

    If you are building static html/js page there is no such session and page just reloads.

    You can use cookies to achieve what you want.

提交回复
热议问题