Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does clearing cookies in firefox also delete localStorage?

I have made a firefox extension and i store the preferences/settings for the extension in localStorage and many users have complained that their preferences/settings gets deleted when they clear their browser cookie.

So this made me wonder if localStorage is any how related to cookies in firefox?

like image 977
Ram Patra Avatar asked Sep 15 '25 13:09

Ram Patra


1 Answers

From Mozilla DOM Storage Guide:

  • DOM Storage can be cleared via "Tools -> Clear Recent History -> Cookies" when Time range is "Everything" (via nsICookieManager::removeAll)

    • But not when another time range is specified: (bug 527667)
    • Does not show up in Tools -> Options -> Privacy -> Remove individual cookies (bug 506692)
  • DOM Storage is not cleared via Tools -> Options -> Advanced -> Network -> Offline data -> Clear Now.

  • Doesn't show up in the "Tools -> Options -> Advanced -> Network -> Offline data" list, unless the site also uses the offline cache. If the site does appear in that list, its DOM storage data is removed along with the offline cache when clicking the Remove button.

like image 77
Barmar Avatar answered Sep 17 '25 03:09

Barmar