What are possible cases making window.history.state null on browser back?
问题 I have my website's query string URL like: ?budget=0-&year=0-&kms=0-&so=-1&sc=-1&pn=1 When user go to next page (From page 1 to page 2): We explicity increment pn (page number by 1) and set it in query string URL. Changed query string: ?budget=0-&year=0-&kms=0-&so=-1&sc=-1&pn=2 I also store the old query string, it looks like: ?budget=0-&year=0-&kms=0-&so=-1&sc=-1&pn=1 I then push both to window history to change URL and save previous for browser back: window.history.pushState(oldQS, null,