title: js and edit url before loading - how to do this
body: <p>I have a url: </p>
  
  <pre><code>www.domain.com/bla/
  </code></pre>
  
  <p>and button in result page: </p>
  
  <pre><code>show 10, 20, 50 per page
  </code></pre>
  
  <p>and pagination: </p>
  
  <pre><code>1, 2, 3, 5.. 
  </code></pre>
  
  <p>but once I have clicked <code>10</code>, url becomes <code>www.domain.com/bla/?show=10</code>, and then if i click page <code>2</code>, <code>show=10</code> is disappearing and becoming <code>www.domain.com/bla/?page=2</code></p>
  
  <p>I have several solution in js, but what is the best and professional way of doing this? </p>
  
  <p>my code: </p>
  
  <pre><code>var show= $('#show').val();
  var url = String(window.location);
  if(url.indexOf("page") !== -1){
        var newurl = url +'&amp;show='+show;
        $('.entries').html(' ').load(newurl, function(){
                $(this).fadeIn();
         });
  }else{
        var newurl = url +'?show='+sortterm;
        $('.entries').html(' ').load(newurl, function(){
                $(this).fadeIn();
         });
  }
  </code></pre>