Firefox SecurityError: “The operation is insecure.”

前端 未结 4 608
半阙折子戏
半阙折子戏 2021-01-05 04:48

I am using Backbone.LocalStorage plugin with backbone app. It is working fine in chrome and safari however, it is giving me below error in firefox.

DO

相关标签:
4条回答
  • 2021-01-05 05:11

    Make sure your domains are same. verify Same Origin Policy which means same domain, subdomain, protocol (http vs https) and same port.

    What is Same Origin Policy?
    How does pushState protect against potential content forgeries?

    0 讨论(0)
  • 2021-01-05 05:12

    I had similar issue with one script, I dig into error and found it required SSL websockets, so I started SSL and again checked, and It worked. Try enabling HTTPS and access website as https://127.0.0.1/ It may solve error.

    0 讨论(0)
  • 2021-01-05 05:13

    This happens when we try to access a resource (CSS...) that is located on a different domain. To deal with this error we can use this:

                       try {
                         //your critical access to ressources !
                         //rules = document.styleSheets[i].cssRules;
                            } catch(e) {
                       if(e.name !== "SecurityError") {
                           throw e;
                           }
    
    0 讨论(0)
  • 2021-01-05 05:19

    Make sure Firefox has cookies enabled. The setting can be found under Menu/Options/Privacy/History

    In the dropdown, select either 'Remember History' or if You prefer use custom settings for history, but select option Accept cookies from sites

    Hope it helps.

    0 讨论(0)
提交回复
热议问题