I have an empty query string on the end of my url after removing the original query string: http://example.com?
Setting window.location.search = '';
doesn't get rid of the question mark, only the contents of the query string. Is there any way to remove the question mark at the end of the url?