title: Should I update all hrefs and src when doing a pushState?
body: <p>If I'm about to call a <code>pushState</code> but I want to preserve all the relative links, images, stylesheets, ect, I do something like this so far:</p>
  
  <pre><code>$('[href]').each(function() { 
      if (!/^#/.test(this.href)) this.href = this.href;
  });
  $('[src]').each(function() { this.src = this.src });
  </code></pre>
  
  <p>My question is: will this work cross browser? Do I need to do <code>$(this).attr('href') = this.href</code> ?</p>
  
  <p>Is this necessary? Is there another way to do this? Is this the best way to do it? And is it always going to work?</p>