How Edge Synchronization Works

Background

Modern versions of Microsoft Edge have a feature to synchronize your favorites and reading lists between devices. This feature is enabled by default for those folks who log into Windows using a "Microsoft Account" (or a domain account that has a link to a "Microsoft Account"). Conversely, this feature is not available if you log in with a so-called "local" account.

The "Sync your content" feature of Edge is controlled via the "more" icon (the 3 little dots) and then the "Setting" link. From there, you can choose to enable or disable Sync.

Location of Sync settings

Note: This is not the same location as all of the rest of the Windows 10 sync settings

Synchronized favorites are stored on each PC and in "the cloud". There is not a "master" PC, as all PCs are treated as "peer-to-peer".

Favorites

When a favorite is created, or imported from another browser, it is assigned a random ID number. This number is used by the synchronization system to process additions, modifications, and deletions. The first phase of the sync system does not look at the names of the favorites... or the URLs during synchronization, it only looks at the ID numbers.

Edge has a strange feature that prevents duplicate favorites that share the same URL in the same folder. That means you can't have two favorites (in the same folder) that point to the same web site.

Synchronization Issues

Consider a scenario where you have two PCs running Win7, each with a list of Internet Explorer favorites that are mostly the same. You upgrade the 1st PC to Win10 and import its favorites into Edge, and then you upgrade the 2nd PC to Win10 and import its favorites. Each of the folders and favorites now have randomly assigned unique IDs.

So when synchronization occurs, you will end up with multiple duplicate folders with favorites divided between the two. This phenomena is caused by two things: 1) Folders can be duplicates, and 2) Favorites cannot share the same URL. So, the folders are duplicated but there is only one copy of each favorite that share the same URL inside those folders.

How to Prevent Duplicate Folders

In the beginning, chose just one PC to perform most of your Edge import operations. For example, perform an import from Internet Explorer on that PC, and do not do any importing on the other PCs. Instead, just wait for synchronization to populate the favorites from this PC. This will create a shared folder structure among all the PCs.

After the major favorite importing/management activities, then it's not so critical to use just one PC. This is because minor changes to an already shared folder structure does not cause many problems.

How to Fix Duplicate Favorites/Folders

So, let's assume that you have imported favorites on each PC before letting them sync... and now you have a bunch of duplicate folders and favorites. There currently isn't an automatic method of consolidating duplicate folders. So, you just have to clean up the mess "by hand" using EdgeManage.

  1. Start EdgeManage as usual
  2. Pick one of the duplicate folders to be the "keeper"
  3. Using multiple selection, move all of the contents of the other folders to the "keeper" folder in one operation
  4. Delete the other duplicate folders
  5. lather, rinse, repeat until all of the duplicates are gone
  6. Save the Changes (via File->Save Changes)

Take a look at this related article on How to have Duplicate Favorites and Folders

Manual Synchronization

Let's assume that the synchronization system is temporarily not working correctly... but you still need to synchronize your favorites from one PC to another. Note: You're doing this under the assumption that the sync system will eventually start working again.

First, just manually copy the files from %USERPROFILE%\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\RoamingState on the "donor PC" to a USB flash drive or cloud storage services. Next, delete all of the existing files at the same location on the "recipient PC". Then lastly, copy those files saved from the "donor PC" to the same location on the "recipient PC"

This action will be essentially the same as the normal "phase 1" as described below. For this to work, the synchronization system should remain enabled on both PCs.

Technical Details

Synchronization of favorites occurs in two phases…

1) The first "transport" phase is the copying of "JSON" files between the device and "the cloud". These files live at %USERPROFILE%\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\RoamingState. When synchronization is enabled, there should be one JSON file for every folder and favorite in Edge. The name of the file is the random number that is assigned to that entry.

My testing has determined that these files typically are transferred over the network in 2-7 minutes, with some outliers taking up to 20 minutes to appear.

This first phase will occur whenever the user is logged in.

2) The second "database" phase occurs when you launch Edge. Edge will look for changes in the JSON files and process each addition, modification, or deletion. You may observe a "flicker" in the favorites list during this activity.

These updates to the database typically occur in 10-20 seconds, with some outliers taking as long as 5 minutes. Note: These times are *after* the transfer phase has completed.

Typical Scenario

The files in the RoamingState folder are used in the following scenarios:

Note: If you do not have the synchronization feature enabled, then you may not have any JSON files... or you may have older files left over from an update that not being used.

Additional Details

If you turn off Synchronization, make some changes, and then turn Synchronization back on, the system will not attempt to discover what happened during that time the sync was off. So those changes are not retroactively synced to the other PCs.

You can use this to your advantage if you are adding a lot of temporary favorites on one PC that you don't really want to be duplicated.

Alternatives

If you can't use the built-in synchronization system (for example, you're using a local account), then take a look at this alternative: Edge Sync