When I refresh the page or redirect it to the same URL, I can click the "window.history.back ()" button; code and return to the previous page.
However, if the query string has been changed, I just go back to the same page when I try to go back.
Example 1:
page1.html → page2.html → page2.html → [back button] → page1.html
Example 2:
page1.html → page2.html → page2.html? x = 123 → [click back button] → page2.html
What I want:
page1.html → page2.html → page2.html? x = 123 → [click back button] → page1.html
, , , JavaScript, ?