当使用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') {
      
            }

 

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐