iframe中的sessionStorage [英] sessionStorage in iframe

查看:1556
本文介绍了iframe中的sessionStorage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将在我的页面上有几个iframe,我将非常密切地在其中使用sessionStorage。我很好奇的是,如果我有单独的存储空间或者所有iframe共享存储空间?尺寸限制如何适用?

I'm going to have several iframes on my page and I'm going to quite intensively use sessionStorage inside them. What I'm curious about is if I will have separate storages or one shared for all iframes? How do the size limits apply?

推荐答案

好的,我自己做了一个测试。至少在Chrome(44)和Firefox(40)中,sessionStorage在页面之间共享,如果它们属于同一个域,则包含iframe,如果它们属于不同的域,则不包含iframe。

OK, I've made a test myself. At least in Chrome (44) and Firefox (40) the sessionStorage is shared among page and the iframes included if they are of the same domain and do not if they are of different domains.

这篇关于iframe中的sessionStorage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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