Chrome has been a long and successful path since its birth, but is it really good? I will not undertake to assert about all its facets, but I want to try to draw public attention to the problems with which I happened to face personally.
A few months ago, I decided to write my own extension for Chrome. A little, but very burning idea to remake the issue page of the chrome History // history /. And that's what came out of it.
The history API is described
here .
')
To begin with, I added a calendar to my page and started to get a list of addresses for an arbitrary day. The function chrome.history.search () is used for this purpose, where, as a request, you should pass an object containing:
text - the text to search for (if all the addresses are needed, this text is transmitted empty)
startTime, endTime - time span
maxResults - limit number of results (0 for all search)
As a result, the function returns an array of objects
HistoryItem (object)
id (string)
url (optional string)
title (optional string)
lastVisitTime (optional number)
visitCount (optional integer)
typedCount (optional integer)
Where
lastVisitTime deserves special attention, this parameter contains the time of the last visit to the page. Those. if I tried to get a list of addresses for the period from September 1 to September 6, 2011, and it contained the address
http://example.com/ that I visited last, for example, today September 9, 2011, then the
lastVisitTime parameter always contained today's date , and in the results of the issuance it turned out a complete nonsense like this:

Initially, I wanted to show the date of my visit to the address for the exact day, but because of the oddities of the API, I had to display the time of the last visit. This shortcoming is not so critical when viewing history for a particular day, but it starts delivering tremendous discomfort when viewing history for an interval of time.
It would seem that
chrome.history.getVisits () comes to the rescue, returning an array of objects with all dates of the URL visit, but calling it for each address is too resource-intensive. So I added a URL info button.

The next disappointment was the search for text in the addresses and titles of the story. Whatever I pass to the
text parameter of the request object, the Chrome API diligently returns anything, but not what I was trying to find. I had to write my own analysis of the results.
Then I began to delete the elements of the story. You probably already guessed that once again I was beaten by failure and, as a result, a lot of crutches to achieve the desired results.
There are two functions:
chrome.history.deleteUrl () - to completely remove the address from the history.
chrome.history.deleteRange () - deletes all addresses that are included in the time interval.
Without thinking twice, I added the “Delete” button near each address and hung
deleteUrl () on it. But each click causes a 2-4 second delay, and a sequential chain of clicks "Delete" at different URLs can hang the browser for minutes. A logical continuation was the addition of the basket, but it still did not get rid of the problem. Deleting 300-400 addresses hangs the browser for 10 minutes (Intel Core 2 Duo E8400).
C
deleteRange () is even sadder. In the URL Information window (see screenshot above) I wanted to add the Delete button opposite each visit, but as it turned out it was a useless undertaking. The function is only able to delete information about the last visit.
It is also not clear why in the
HistoryItem (object) there is an
id for each entry, but there is no function that allows deleting by
id .
When the extension was already posted to the public and was successfully used by thousands of users, my attention was drawn to the review “Doesn't fix the problem of going farther back than 10 weeks in history ...”. it turned out Chrome keeps a very limited history of visits, something about the last 25,000 addresses. With my intensity of using a browser on my home PC, these are the last three months.

All other URLs silently and transparently to the user are sent to / dev / null.
Why am I writing all this? Most likely it is an impulse to pour out the soul about the sore, as well as an attempt to explain to users (not just my extension) why 300 addresses have to be deleted for 10 minutes. Maybe someone from the corporation of good interested in this article ...
Here is a link to my extension:
History calendarHistory Calendar ButtonThere are also two worthy
competitors in the Chromium repository:
Recent HistoryHistory 2