Bug 9148 - Setting location.href is not registered in history
Summary: Setting location.href is not registered in history
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: History (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction, InRadar
Depends on: 9150
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-28 08:41 PDT by David Kilzer (:ddkilzer)
Modified: 2007-07-22 20:51 PDT (History)
4 users (show)

See Also:


Attachments
Test v1 (2.20 KB, patch)
2006-05-28 08:45 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2006-05-28 08:41:15 PDT
Setting location.href to load a page does not cause that URL to be recorded in the history.  When a link to the previously loaded page appears later, that link is rendered as unvisited rather than visited.

In Firefox 1.5.0.3 on Mac OS X, a page loaded via location.href is recorded in history.

In MSIE 6 on WinXP SP2, a page loaded via location.href is also recorded in history.

This behavior occurs in Safari 2.0.3 (417.9.3) on Mac OS X 10.4.6 (8I127) as well as locally-built WebKit r14551.
Comment 1 David Kilzer (:ddkilzer) 2006-05-28 08:45:55 PDT
Created attachment 8578 [details]
Test v1

Test demonstrating the problem with setting location.href.  It may be possible to simplify this test.
Comment 2 Brady Eidson 2007-05-23 17:42:21 PDT
I'm quite interested to know what the actual correct behavior is.  I know that Safari 2.0 and ToT both act differently from FFX, which puts all 3 items in history, but do we know which is actually "correct"?
Comment 3 David Kilzer (:ddkilzer) 2007-05-23 20:43:17 PDT
(In reply to comment #2)
> I'm quite interested to know what the actual correct behavior is.  I know that
> Safari 2.0 and ToT both act differently from FFX, which puts all 3 items in
> history, but do we know which is actually "correct"?

NOTE: I filed this bug because I noticed a difference in behavior between Safari/WebKit, Firefox and MSIE 6.  I do not know what the correct behavior is.
Comment 4 Beth Dakin 2007-06-07 11:47:11 PDT
<rdar://problem/5257045>
Comment 5 David Kilzer (:ddkilzer) 2007-07-08 14:58:05 PDT
This bug was not fixed by the fix for Bug 13400.

Comment 6 David Kilzer (:ddkilzer) 2007-07-17 07:48:26 PDT
May be fixed by:  http://trac.webkit.org/projects/webkit/changeset/24353

Comment 7 David Kilzer (:ddkilzer) 2007-07-22 20:51:01 PDT
(In reply to comment #6)
> May be fixed by:  http://trac.webkit.org/projects/webkit/changeset/24353

This appears to be fixed now.  (The test case doesn't work with DRT, but it works in Safari.)