4

I'm using localforage to persist the state for a react app. However, It's still not perfect. Because in safari private mode, the state will be removed after refreshing the page. What is the fallback for this situation?

Bruce Mu
  • 893
  • 11
  • 22

1 Answers1

-3

The whole point of Private/Incognito/etc mode is that sites are not able to persist data beyond the browsing session, and therefore (1) leave a trace on the user's device that the site was accessed and (2) allow the site or third party content to recognize and track visitors.

If there were such a mechanism it would be considered a serious privacy bug by the browser vendor and fixed promptly.

Joshua Bell
  • 7,727
  • 27
  • 30
  • But will refreshing the page considered as creating a new browsing session? Because it works in Chrome private mode and Firefox private mode. They will not persist the data after closing the browser. But before closing the browser, it will persist the data. – Bruce Mu Feb 13 '17 at 02:46
  • 2
    As you noted, a browsing session does not correspond to a single page load. In Chrome it's an initial incognito window and any tabs launched from that window or descendants. Data is stored for the lifetime of the session, discarded when all tabs in the session are closed. – Joshua Bell Feb 13 '17 at 17:26