title: REST/Ajax deep linking compatibility - Anchor tags vs query string
body: <p>So I'm working on a web app, and I want to filter search results.</p>
  
  <p>A nice restful implementation might look like this:</p>
  
  <pre><code>1. mysite.com/clothes/men/hats+scarfs
  </code></pre>
  
  <p>But lets say we want to ajax up the filtering, like the cool kids, and we want to retain deep linking, we might use the anchor tag and parse that with Javascript to show the correct listings:</p>
  
  <pre><code>2. mysite.com/clothes#/men/hats+scarfs
  </code></pre>
  
  <p>However, if someone clicks the first link with JS enabled, and then changes filters, we might get:</p>
  
  <pre><code>3. mysite.com/clothes/men/hats+scarfs#/women/shoes
  </code></pre>
  
  <p>Urk.</p>
  
  <p>Similarly, if someone does not have JS enabled, and clicks link 2 - JS will not parse the options and the correct listings will not be shown.</p>
  
  <p>Are Ajax deep links and non-Ajax links incompatible? It would seem so, as servers cannot parse the # part of a url, since it is not sent to the server.</p>