This can occur when Safari is in private mode browsing.(当Safari处于私有模式浏览时,可能会发生这种情况。)
While in private browsing, local storage is not available at all.(在私密浏览中,本地存储根本不可用。)
One solution is to warn the user that the app needs non-private mode to work.(一种解决方案是警告用户应用程序需要非私有模式才能工作。)
UPDATE: This has been fixed in Safari 11 , so the behaviour is now aligned with other browsers.(更新:这已在Safari 11中修复,因此行为现在与其他浏览器对齐。) 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…