title: Add parameters to url without refresh
body: <p>I want to add parameters to url without refreshing the page. I have used <code>history.pushState</code> and <code>history.replaceState</code>. I put a debugger on the function in javascript, when I debug <code>history.pushState</code>, it replaces the url, but then it changes again to the previous. </p>
  
  <p>What I want to is, e.g. below is my url</p>
  
  <pre><code>.../?id=1
  </code></pre>
  
  <p>Now I will click on one of my filters and the url must be as follows</p>
  
  <pre><code>.../?id=1,2
  </code></pre>
  
  <p>Then I will click on <code>Search</code> button to apply filter. What should be the best practices?</p>