The query string is not considered part of the URL. You can retrieve these vales through the window.location.search property.
Correct. The query string is not a part of window.location.href and is located in window.location.search, but the href and query string are both mashed together in window.location. Why use two different strings and concatenate them when you can use one string?