You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The standard behavior for browser importers in Chromium/Brave is to import favicons automatically when the user imports bookmarks. This allows the bookmarks in the bookmarks bar, menu, and manager to be immediately accompanied by their familiar favicons, which is a useful visual aid for users.
Importing favicons from Chrome was implemented as part of brave/brave-core#49. It was straightforward thanks to Chrome's implementation, which stores the metadata and bitmaps of favicons in a dedicated Favicons sqlite db.
Brave browser-laptop's situation is more complicated. The entries in session-store-1's "bookmarks" dict have a favicon key, but this is the URL of the favicon rather than the bitmap data, which is what we are looking to import. In some cases, the favicon URL is a data: URL, in which case the bitmap data is encoded in the URL, but this is uncommon and depends on the corresponding website's implementation.
After asking on Slack, I learned that since browser-laptop uses webContents to render the UI, including favicons, they are probably available in the cache. There are some further questions that I have not yet had time to investigate:
Does the cache contain all favicons, or only a subset (due to eviction)?
How do we query and retrieve data from the cache? A quick look at ~/Library/Application\ Support/brave/Cache/ shows it's not a simple sqlite database (from a glance, it looks like a Merkle tree). We'll probably have to use Chromium's cache API's.
Steps to Reproduce
Start brave-browser with a clean profile.
Import bookmarks from a Brave browser-laptop profile.
Open the Bookmarks Manager
Actual result:
The bookmark entries in the Bookmarks Manager (or anywhere else in the UI) do not have favicons associated with them; instead, there is an empty square.
If you visit a bookmark (more specifically, any page that shares the bookmark's origin) and then refresh the Bookmarks Manager, the favicon should become visible because it was loaded anew from the network.
Expected result:
Imported bookmarks should immediately have the correct favicons associated with them in the UI, to make the transition experience as seamless as possible.
The text was updated successfully, but these errors were encountered:
Description
Follow-up for brave/brave-core#185.
The standard behavior for browser importers in Chromium/Brave is to import favicons automatically when the user imports bookmarks. This allows the bookmarks in the bookmarks bar, menu, and manager to be immediately accompanied by their familiar favicons, which is a useful visual aid for users.
Importing favicons from Chrome was implemented as part of brave/brave-core#49. It was straightforward thanks to Chrome's implementation, which stores the metadata and bitmaps of favicons in a dedicated
Favicons
sqlite db.Brave browser-laptop's situation is more complicated. The entries in
session-store-1
's"bookmarks"
dict have afavicon
key, but this is the URL of the favicon rather than the bitmap data, which is what we are looking to import. In some cases, the favicon URL is adata:
URL, in which case the bitmap data is encoded in the URL, but this is uncommon and depends on the corresponding website's implementation.After asking on Slack, I learned that since browser-laptop uses webContents to render the UI, including favicons, they are probably available in the cache. There are some further questions that I have not yet had time to investigate:
~/Library/Application\ Support/brave/Cache/
shows it's not a simple sqlite database (from a glance, it looks like a Merkle tree). We'll probably have to use Chromium's cache API's.Steps to Reproduce
Actual result:
The bookmark entries in the Bookmarks Manager (or anywhere else in the UI) do not have favicons associated with them; instead, there is an empty square.
If you visit a bookmark (more specifically, any page that shares the bookmark's origin) and then refresh the Bookmarks Manager, the favicon should become visible because it was loaded anew from the network.
Expected result:
Imported bookmarks should immediately have the correct favicons associated with them in the UI, to make the transition experience as seamless as possible.
The text was updated successfully, but these errors were encountered: