How does facebook download data to local storage after the browser is closed?
I'm on windows 7x64 using up to date firefox (currently 53.0.2).
I've installed the "Foundstone HTML5 Local Storage Explorer 1.1.1 signed".
I also use "Selective Cookie Delete 4.1.1 signed" that deletes all but 5 cookies from 3 websites when I close firefox.
Action: I'm browsing normally and I logon to facebook. (I always log off when I close it, never use it to login into other sites, and I never "stay" logged into anything) I read the few posts from my family members, then click over to my pages feed and look at posts from all of 20 or so liked pages.
I open HTML5 Local Storage Explorer from the tools menu and hit the "Clear Local Storage" button. (I've tried refreshing it before closing the browser, nothing)
I close firefox and count to ten, five is not long enough, (aprox 10 seconds) and hit the "Refresh" button on the HTML5 Local Storage Explorer window and there are 3 new items from facebook.
I'm not worried about the actual items I'm just curious as to how data is being downloaded to my browsers local storage when the browser is not even open.
Can anyone explain how this is done?
Všechny odpovědi (2)
You close the browser window, but leave a specific window that is opened by an extension open?
If that is the case then Firefox is still running. Only when you close all open windows or better use the power button in the "3-bar" Firefox menu button drop-down list or use the File menu (Exit) then Firefox gets closed and won't be able to store data.
When you "unload" a web page, either by closing it or navigating that tab to a different page, Firefox allows pages to run code in response to three different "events". The first allows pages to display that annoying "Are you sure?" box. All three would allow the page to store data in local storage or cookies. Info on these events:
- https://developer.mozilla.org/docs/Web/Events/beforeunload
- https://developer.mozilla.org/docs/Web/Events/pagehide
- https://developer.mozilla.org/docs/Web/Events/unload
To me that seems to be the most likely explanation.
Another possibility is a service worker. That's a kind of background thread sites can use to keep refreshing local data even when you leave the site. This internal page lists them -- type or paste this address in the address bar and press Enter to view:
about:serviceworkers
I've never seen one from Facebook, but other social sites create them. You can unregister them using buttons on the page.