I'm trying to figure out how the browsers handle the hashes in the url requests and the page rendering.
For example, let's say I go to www.example.com/#footer.
When I request this URL the browser makes the GET request to the www.example.com but doesn't have the #footer in the request.
When the page loads, the browser knows I asked for the #footer and jumps to that location.
What happens in the more complex situations when I do a redirect? For example, let's say I 301 redirect to www.example.com/birds/#middle. How does the browser know that it can jump to the #middle if hash is not part of the request URL?
Also how does web server know that I'm about to jump to particular anchor #hash so that it can serve content just for #hash? (Like facebook does when you go from one section to another. Only #hash anchor tag changes.)