window.location.pathname // /cat/sub-cat
// For reference:
window.location.host // www.example.com (including port if there's any)
window.location.hostname // www.example.com
window.location.hash // #top
window.location.href // http://www.example.com/cat/sub-cat?filter=a#top
window.location.port // (empty string)
window.location.protocol // http:
window.location.search // ?filter=a