Remove query string from URL in JavaScript?
Posted: Sat Apr 26, 2008 7:17 pm
I'm trying to remove any existing queries from the window.location in JavaScript. I'm trying to add my own query though it must be the only query when the next page is loaded...
Code: Select all
var go_to = self.location = self.location.protocol+'//'+self.location.host+self.location.pathname-self.location.search;window.location = go_to + '?only_my=query'