![]() We recommend using storage.local to store larger amounts of data. The storage limit is 10 MB (5 MB in Chrome 113 and earlier), but can be increased by requesting the "unlimitedStorage" permission. ![]() The Storage API is divided into the following storage areas: storage.local Data is stored locally and cleared when the extension is removed. There are also some nuances to how web storage APIs work in extensions. Inside the offscreen document's onMessage handler, call the conversion routine.If your data isn't found, create an offscreen document and call sendMessage() to start the conversion routine.In the extension service worker, check chrome.storage for your data.Create an offscreen document with a conversion routine and an onMessage handler.To move data from web storage APIs to extension storage APIs from a service worker: Data saved using the Web Storage API is lost when the user clears their browsing history.Content scripts share storage with the host page.Extension service workers can't use the Web Storage API.While extensions can use the Storage interface (accessible from window.localStorage) in some contexts (popup and other HTML pages), we don't recommend it for the following reasons: Includes an exclusive read-only managed storage area for enterprise policies.Stored settings persist even when using split incognito. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |