title: Get URL Path without last segment
body: <p>How can I get the URL Path of the current site, but without the last segment:</p>
  
  <pre><code>http://www.domain.com/first/second/last
  </code></pre>
  
  <p>I only need <code>http://www.domain.com/first/second</code> … with jQuery (or only JavaScript)</p>