I have the following url:
url = 'http://stackoverflow.com/questions/ask?new=question'
How would I get the url without the querystring? Right, now I am doing the following, but is there a single method to do this instead of adding two?
window.location.origin + window.location.pathname