{"id":8508,"date":"2018-08-03T11:02:39","date_gmt":"2018-08-03T18:02:39","guid":{"rendered":"http:\/\/blog.mozilla.org\/addons\/?p=8508"},"modified":"2018-08-03T11:34:27","modified_gmt":"2018-08-03T18:34:27","slug":"new-backend-for-storage-local-api","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/","title":{"rendered":"New backend for storage.local API"},"content":{"rendered":"<p>To help improve Firefox performance, the backend for the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/API\/storage\/local\">storage.local API<\/a> is migrating from JSON to IndexedDB. These changes will soon be enabled on <a href=\"https:\/\/blog.nightly.mozilla.org\/\">Firefox Nightly<\/a> and will stabilize when <a href=\"https:\/\/wiki.mozilla.org\/Release_Management\/Calendar\">Firefox 63 lands<\/a> in the <a href=\"https:\/\/www.mozilla.org\/en-US\/firefox\/channel\/desktop\/\">Beta<\/a> channel. If your users switch between Firefox channels using the same profile during this time, they may experience data regression in the extensions they have previously installed.<\/p>\n<p>We recommend that users do not change Firefox channels between now and September 5, 2018. However, if they do and they contact you with questions about why their extensions are not behaving normally (such as losing saved options or other local data), please point them to this post for instructions on how to retrieve and re-import their extension data.<\/p>\n<h3>How to retrieve migrated data and re-import the extension data<\/h3>\n<p>Go to <code>about:config<\/code> and check the setting for <code>extensions.webextensions.ExtensionStorageIDB.enabled<\/code>. If it is set to <code>true<\/code>, the extension data has been moved to the new backend and is not directly available as a single file in the file system.<\/p>\n<p>If the extension data is not available after it has been moved in the new backend, follow these steps to ask Firefox to re-import the extension data:<\/p>\n<ol>\n<li>Look up the Extension ID by going to <code>about:debugging<\/code><\/li>\n<li><a href=\"https:\/\/support.mozilla.org\/en-US\/kb\/profiles-where-firefox-stores-user-data\">Navigate to your system profile directory<\/a><\/li>\n<li>Go to the folder called <code>browser-extension-data<\/code><\/li>\n<li>Go to the folder of the Extension ID you found in <code>about:debugging<\/code><\/li>\n<li>You will see a file named <i>storage.js.migrated<\/i> (or <i>storage.js.migrated.N<\/i> if the data has migrated more than once). Your data has been moved into this file.<\/li>\n<li>Uninstall the extension<\/li>\n<li>Copy the file named <i>storage.js.migrated<\/i> to a new file named <i>storage.js<\/i> in the same directory<\/li>\n<li>Open the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Tools\/Browser_Console\">browser console. <\/a>\n<ol>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Tools\/Browser_Console\">You can access the browser console by going to the from [hamburger menu] \u2192 Web Developer \u2192 browser console<\/a><\/li>\n<\/ol>\n<\/li>\n<li>Re-install the extension<\/li>\n<li>Wait for a message \u201cMigrating storage.local data for &lt;Extension debug name&gt;\u201d and \u201cstorage.local data successfully migrated to IDB Backend for &lt;Extension debug name&gt;\u201d to appear in the browser console<\/li>\n<\/ol>\n<h3>How to address errors when re-importing migrated extension data<\/h3>\n<p>If you see a <code>QuotaExceededError<\/code> in the browser console during the final step in the data retrieval and re-importing process, you may have insufficient disk space. After you free \u00a0additional disk space, you maybe be able to fix this issue by following the steps outlined in the section above.<\/p>\n<p>If the problem persists and the extension is using the new ExtensionStorageIDB backend, please <a href=\"https:\/\/bugzilla.mozilla.org\/enter_bug.cgi?product=WebExtensions\">report the issue<\/a> on Bugzilla. You can see if the extension is using the ExtensionStorageIDB backend by going to <code>about:config<\/code> and seeing if <code>extensions.webextensions.ExtensionStorageIDB.migrated.EXTENSION_ID<\/code> is set to <code>true<\/code>.<\/p>\n<h3>Reporting issues with the storage.local API<\/h3>\n<p>If you are an extension developer and you encounter any issues that seem to be related to the storage.local API, please <a href=\"https:\/\/bugzilla.mozilla.org\/enter_bug.cgi?product=WebExtensions\">file a new issue<\/a> on Bugzilla and add it as a blocker of <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1474562\">bug 1474562<\/a> so that we can promptly investigate it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To help improve Firefox performance, the backend for the storage.local API is migrating from JSON to IndexedDB. These changes will soon be enabled on Firefox Nightly and will stabilize when &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/\">Read more<\/a><\/p>\n","protected":false},"author":1405,"featured_media":8230,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,581,121,278886],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>New backend for storage.local API - Mozilla Add-ons Community Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Caitlin Neiman\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/\",\"name\":\"New backend for storage.local API - Mozilla Add-ons Community Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/08\/0OXhim3.png\",\"datePublished\":\"2018-08-03T18:02:39+00:00\",\"dateModified\":\"2018-08-03T18:34:27+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/d42e525583ec49a90da7806934fd533f\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/#primaryimage\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/08\/0OXhim3.png\",\"contentUrl\":\"https:\/\/blog.mozilla.org\/addons\/files\/2017\/08\/0OXhim3.png\",\"width\":1024,\"height\":1024,\"caption\":\"Nightly Logo\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/addons\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"New backend for storage.local API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/\",\"name\":\"Mozilla Add-ons Community Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/d42e525583ec49a90da7806934fd533f\",\"name\":\"Caitlin Neiman\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/022ba856a87c8f40739b7ef2fdcdf33c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/022ba856a87c8f40739b7ef2fdcdf33c?s=96&d=mm&r=g\",\"caption\":\"Caitlin Neiman\"},\"description\":\"Add-ons Community Manager at Mozilla.\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/author\/cneimanmozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"New backend for storage.local API - Mozilla Add-ons Community Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/","twitter_misc":{"Written by":"Caitlin Neiman","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/","url":"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/","name":"New backend for storage.local API - Mozilla Add-ons Community Blog","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/addons\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/#primaryimage"},"image":{"@id":"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.mozilla.org\/addons\/files\/2017\/08\/0OXhim3.png","datePublished":"2018-08-03T18:02:39+00:00","dateModified":"2018-08-03T18:34:27+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/d42e525583ec49a90da7806934fd533f"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/#primaryimage","url":"https:\/\/blog.mozilla.org\/addons\/files\/2017\/08\/0OXhim3.png","contentUrl":"https:\/\/blog.mozilla.org\/addons\/files\/2017\/08\/0OXhim3.png","width":1024,"height":1024,"caption":"Nightly Logo"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/addons\/2018\/08\/03\/new-backend-for-storage-local-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/addons\/"},{"@type":"ListItem","position":2,"name":"New backend for storage.local API"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/addons\/#website","url":"https:\/\/blog.mozilla.org\/addons\/","name":"Mozilla Add-ons Community Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/d42e525583ec49a90da7806934fd533f","name":"Caitlin Neiman","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/022ba856a87c8f40739b7ef2fdcdf33c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/022ba856a87c8f40739b7ef2fdcdf33c?s=96&d=mm&r=g","caption":"Caitlin Neiman"},"description":"Add-ons Community Manager at Mozilla.","url":"https:\/\/blog.mozilla.org\/addons\/author\/cneimanmozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/8508"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/users\/1405"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/comments?post=8508"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/8508\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media\/8230"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media?parent=8508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/categories?post=8508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/tags?post=8508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}