LocalStorage Is Not Shared Across Tabs In The Private Mode In Mobile Safari
Solution 1:
You could connect to a back-end server and store your data in a database, but private mode is specifically meant to block cookies and forms of local storage, so you cannot reliably store your data across tabs in the frontend. Users know this, and they don't expect accounts to stay logged in or anything of the like. That being said, if your function seems like something users would expect to still be able to use it across tabs, invest the time to check out AJAX, PHP insertion with MySQL, and PHP retrieval with MySQL. If this data needs to be device-specific, you can grab the user's ip address with PHP using $_SERVER['REMOTE_ADDR']
and associate the data with their IP in your database, but be aware that IPs can change if the user changes networks.
Post a Comment for "LocalStorage Is Not Shared Across Tabs In The Private Mode In Mobile Safari"