title: How to change browser url without changing anything in history
body: <p>You might think this is a duplicate, but it's not. I've seen the other SO answers about changing the browser url with <code>replaceState()</code> but I have a problem...</p>
  
  <p>On one webpage on my website, it receives a lot of parameters, so the link goes on and on and on... I did <code>replaceState()</code>, and it shortened the URL by a lot. That worked. If I go on another link, and I go back in history, the URL will still be the same that I defined on <code>replaceState()</code> and the page gives a 404 error. Is there a way to just load the link the way it is and then temporarily change the URL so the user doesn't see a huge link but the system uses the actual URL? </p>
  
  <p>I'm using JSP, go ahead and give me answers in JavaScript, JQuery, or Java.</p>