当使用chrome 无痕模式时, 默认阻止第三方cookie 

如果使用了localStorge或者cookie , 就会在js里报错

报错SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

 

这个问题只能在代码层面做兼容处理 ,先不让报错

            if(navigator.cookieEnabled&&typeof window.localStorage !== 'undefined') {
      
            }

 [javascript] 报错SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案