Changes

Jump to: navigation, search

Browser History:Redirects

1,271 bytes added, 20:59, 14 December 2005
Added background on visit paths
An additional level of optimization would include the URL of the redirect source in the history column. If we ever need to add another redirect source and the redirect column is already full and does not match, we can specify some known string that indicates there is more than one source. This saves a little bit of time since in the next-most-common case where there is only one redirect source can use a simple query over history rather than a join over all visits. This optimization may or may not be worth it.
== How redirecting works Capturing redirects and visit paths ==
=== Redirecting Visit paths === The new history system would like to track visit trails, with information about how each visit occurred. For example, we would like to know that the user typed the URL for site A, went from A to B by following a link, was automatically redirected to C, and then followed a link on C to open D in a new window. Currently, this information can not be tracked accurately. When the user follows links, the history system has the referrer, but does not have any other data. For example, if the user follows A->B->C and D->B->F in separate windows, we'll get confused becuase B was open in two windows at once and we can't figure out where it came from. This is not a critical case to handle correctly, but it would be nice to do. More critical is that redirects can not be tracked. If a user follows a link from A to B, but B redirects to C, we'll get 2 messages: (B, redirect=true, parent=A), (C, redirect=false, parent=A). No information is available to the history system that B redirected to C. We would also like to be able to track the types of transitions: regular link following, bookmark opening, typing, and redirects. There would also be other flags, such as opened in new window and opened in new tab. === How redirecting notifications work from the DocShell/DocLoader level ===
nsDocLoader implements nsIChannelEventSink, which gets channel event messages. When it gets OnChannelRedirect, it has both the new and the old channels. It sets the STATE_IS_DOCUMENT flag if the channel has its LOAD_DOCUMENT_URI flag set, and fires a state change notification.
202
edits

Navigation menu