Chrome Extension storage

Author: yifei / Created: June 12, 2017, 9:30 p.m. / Modified: June 12, 2017, 9:53 p.m. / Edit

Basic Concepts

there are 3 storage area for chrome, sync, local, managed areas. the sync area will be synced with the cloud. managed area is read-only.

all your extension scripts share the same storage, including content scripts, they don't belong to their domain's localStorage.

Usage'key', function(data) {});["KEY1", "KEY2"], function(data) {});, function() {});  // data is key-value pair to store'key', function() {});["KEY1", "KEY2"], function() {}); {});


有任何问题可以发邮件到 kongyifei (at) 讨论