Can anybody tell me what actually does? I think it redirects the current window to the new location. Is there any way in javascript that can forward the request instead of redirect?
It's not a redirect either (which also makes sense only in the context of a server). Setting the href property replaces the current page with a different one, which leads to an HTTP request being sent to the server.
Ulf's point is an important one. Many people talk about such changes in page location as "redirects" when, in fact, a redirect is a specific response received from the server that causes the browser to "redirect" to an alternate URL. Clicking a link or using JavaScript to change the page URL does not use the redirect mechanism.