title: How do I use window.history in JavaScript?
body: <p>I found a lot of questions about this on Stack Overflow, but they were all very specific about certain parts. I did find <a href="https://stackoverflow.com/q/4015613/3878168">this</a> question whose answers provide some nice references, but they don't actually explain how it all works, and their examples hardly do anything. I want to know more about how it all works together, and I want to use vanilla JavaScript.</p>
  
  <p>(Also, many of the answers on other questions are years old.)</p>