Bug 24701 - Hash after 301 redirect url lost
Summary: Hash after 301 redirect url lost
Status: RESOLVED DUPLICATE of bug 24175
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P3 Normal
Assignee: Nobody
URL: http://tinyurl.com/ctxebo#second
Depends on:
Reported: 2009-03-19 12:15 PDT by Jessie Berlin
Modified: 2009-03-21 04:21 PDT (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Jessie Berlin 2009-03-19 12:15:50 PDT
When a hash for a div or anchor is placed after an url that 301 redirects to another url, the hash is not kept when the redirect is executed.

Steps to reproduce:
1. Create a site that has a lot of text and a div with an id far down on the page that is not visible when first navigating to that page. (e.g. http://www.eecs.tufts.edu/~jberli03/WebkitDebug/hash.html which contains a div with id="second" far down on the page)
2. Create a tiny url that redirects to that site. (e.g. http://tinyurl.com/ctxebo)
3. Paste the tiny url into the address bar and add the hash to the end of it with the id of the div far down on the page. (e.g. http://tinyurl.com/ctxebo#second)
4. Notice that the hash is lost and it just redirects you to the site without scrolling down to the appropriate div or adding the has to the url in the address bar.

I am not entirely sure if this is a bug or just a design decision in Webkit (both the Nightly and Safari 4 beta).

The functionality is there in FF 3.0.7 for the Mac (i.e. http://tinyurl.com/ctxebo#second redirects to http://www.eecs.tufts.edu/~jberli03/WebkitDebug/hash.html#second and scrolls down to the div with the id "second").

While it is not really all that important for tiny urls, this might have an impact on any other 301 redirects.
Comment 1 Alexey Proskuryakov 2009-03-21 04:21:58 PDT

*** This bug has been marked as a duplicate of 24175 ***