javascript - sessionStorage in Firefox - Stack Overflow

in firefox 9, when i do:var msg = sessionStorage.getItem("message");The browser ask with the

in firefox 9, when i do:

var msg = sessionStorage.getItem("message");

The browser ask with the error: "Operation is not supported", firefox not implement the webStorage of html5? or this case is only for sessionStorage and not for localStorage?. Thx.

in firefox 9, when i do:

var msg = sessionStorage.getItem("message");

The browser ask with the error: "Operation is not supported", firefox not implement the webStorage of html5? or this case is only for sessionStorage and not for localStorage?. Thx.

Share Improve this question edited Jan 19, 2012 at 10:23 Devjosh 6,4824 gold badges40 silver badges61 bronze badges asked Jan 19, 2012 at 10:21 KalamaricoKalamarico 5,69622 gold badges56 silver badges73 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 9

Session storage is only available when you are serving your page from a server - you'll find that it doesn't work if you open the HTML page locally because there is no session.

In the case of browsers that may not support session storage, you can test for the feature:

if (window.sessionStorage) {
    ...

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743918226a4529565.html

相关推荐

  • javascript - sessionStorage in Firefox - Stack Overflow

    in firefox 9, when i do:var msg = sessionStorage.getItem("message");The browser ask with the

    2天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信