JS obtém parte diferente do URL
var newURL = window.location.protocol + "//" + window.location.host + "/" + window.location.pathname + window.location.search
Tame Tiger
var newURL = window.location.protocol + "//" + window.location.host + "/" + window.location.pathname + window.location.search