检查 window.sesstionStorage 是返回 true 的,可是当设置值时window.sesstionStorage.setItem('prop', 'value'); 以后的所有代码就都不值行了~
window.sesstionStorage
true
window.sesstionStorage.setItem('prop', 'value');
有遇到过的没~
走同样的路,发现不同的人生
In private browsing mode, Safari, iOS Safari and the Android browsers do not support setting sessionStorage or localStorage.
Have you encountered this?
I found the reason. 6 plus is enabled by default in Safari. As a result, an error is reported when Private Browsing is executed setItem(). Thanks @limichangeError: QuotaExceededError: DOM Exception 22
6 plus
Safari
Private Browsing
setItem()
Error: QuotaExceededError: DOM Exception 22
Have you encountered this?
I found the reason.
6 plus
is enabled by default inSafari
. As a result, an error is reported whenPrivate Browsing
is executedsetItem()
. Thanks @limichangeError: QuotaExceededError: DOM Exception 22