Firefox SecurityError:“操作不安全”。 [英] Firefox SecurityError: "The operation is insecure."

查看:3225
本文介绍了Firefox SecurityError:“操作不安全”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Backbone.LocalStorage 插件与骨干应用程式。

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.


DOMException [SecurityError:操作不安全。
code:18
nsresult:0x80530012
location: http:// localhost:8000 / js / libs / backbone.localStorage / backbone.localStorage.js?version = 1453910702146:137]

我使用的是python simpleHttpServer

I am using python simpleHttpServer

我解决了此错误?

UPDATE

p>

Here is my code.

paths: {
    'jquery'        : 'libs/jquery/dist/jquery',
    'underscore'    : 'libs/underscore/underscore',
    'backbone'      : 'libs/backbone/backbone',
    'localStorage'  : 'libs/backbone.localStorage/backbone.localStorage',
    'text'          : 'plugins/text'
}

这里是使用localStorage的集合。

Here is collection where localStorage is used.

var Items = Backbone.Collection.extend({

    model: SomeModel,

    localStorage: new Backbone.LocalStorage('items'),
});

UPDATE 2

我使用的是firefox 36.

I am using firefox 36.

UPDATE 3

这是一个CORS问题,但我的firefox版本是36.哪个应该很好。

It seems like it is a CORS issue but my firefox version is 36. Which should be fine.

UPDATE 4

我也收到这个错误在firefox nightly版本44.我也更新了我的firefox到版本44.仍然同样的错误。

I am also getting this error in firefox nightly version 44. I also updated my firefox to version 44. Still same error.

推荐答案

确保Firefox已启用coockies。
设置可以在菜单/选项/隐私/历史

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

在下拉菜单中选择记住历史记录,或者如果您喜欢使用自定义设置历史记录,选择选项接受来自网站的Cookie

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

希望它有帮助。

这篇关于Firefox SecurityError:“操作不安全”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆