Use window.location 'search' property instead of 'href' so that only querystring is parsed