Changes

Jump to: navigation, search

Browser History:Redirects

2,071 bytes added, 21:13, 14 December 2005
Description of the typed flag
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.
 
=== The "typed" flag works ===
 
The current system keeps track of whether URLs in history were typed. This is used to boost the ranking of those pages in autocomplete. When the user types a URL into the browser, the javascript code in the browser calls the history system and notifies it that the URL has been typed. The history system will set the flag on the corresponding history entry (if it is not already set).
 
If there is no history entry for the typed URL, a new one is created marked typed but hidden and never visited. When the document is loaded, the history system is notified of the visit and it unhides the entry and saves the visit date, preserving the typed flag. This way, typing an invalid URL that is never loaded will not fill the history and autocomplete lists with junk.
 
With this setup, we have no way of knowing when a <i>specific</i> visit was typed. Because the typed and the visit notifications arrive asynchronously from different components, we have no way of associating specific typed flags with specific visits.
 
One approach would be to keep a list of the <i>N</i> most recent typed notifications. When a visit comes through, associate that visit with the typed nofitication and remove it from the queue. This will break if the URL is loaded in more than one window, but will work in the common case. We will also have to clean up this list because some typed URIs are invalid and will never be visited, but some will take a long time to load. It is not clear what the lifetime of these should be.
 
We would also like to add a bookmark notification equivalent to the typed flag for when the user follows a bookmark.
 
It would be best if the typed/bookmark flags could be associated with a specific docshell. When the user types something, it would associate a given URL as typed/bookmarked for the docshell. The next visit on that docshell will either be that URL if it was loaded correctly or something else if the user gave up and followed a link instead. If we see there is something else, we can immediately discard the typed URL.
=== How redirecting notifications work from the DocShell/DocLoader level ===
202
edits

Navigation menu