It's well known that the URL fragment (the part after the #) is not sent to the server.
I do wonder though how fragments work when a server redirect (via HTTP status 302 and Location: header) is involved.
My question is really two-fold:
If the original URL had a fragment (
/original.php#foo), and a redirect is made to/new.php, does the fragment part of the original URL simply get lost? Or does it sometimes get applied to the new URL?
Will the new URL ever be/new.php#fooin this case?Regardless of the original URL, if the server redirects to a new URL with a fragment (
/new.php#foo), will the fragment get "honored"? Or does the server really have no business interfering with the fragment at all -- and will the browser therefore ignore it by simply going to/new.php??