On a browser, sessionStorage in Safari's Private Browsing does not work the same as Chrome's Incognito Mode and Firefox's Private Window?

房东的猫 提交于 2019-11-28 07:26:27

Your assessment is practically accurate:

  • Safari will just use a quota of 0 in private mode, so all attempts to set a value will fail. This is kinda OK according to the spec, as the spec does not mandate a minimum space requirement.
  • Chrome and Firefox still allow you to use storage, however private storage is independent from non-private, i.e. setting an item in private mode will not reflect back into non-private mode (important for localStorage only).

Please note that other browsers are also free to throw QuotaExceededError exceptions at any given time, should you go over the quota.

Safari latest version (Version 12.0) already have access to sessionStorage without any issue in incognito mode.

Safari Pivate mode supports localstorage and SessionStorage.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!