开发者

jStorage problems persisting across http and https

We started using jStorage a few weeks ago to store some help data for elements so that it would be persisted across multiple pages. This seems to work fine until we redirect to a page in our website that uses https. Once there the data is no longer available a开发者_如何学运维lthough I can push new data up into jStorage. What I need is the state that was in the http page.

We do something like:

$.jStorage.set(key, value);

and

$.jStorage.get(key);

which works fine in either http or https, but the storage seems to be different for both.

This might be just how things are and we will need to use cookies or something else to re-init the state. Any suggestions would be helpfull.

Thanks

Gary


You simply can't use it this way http vs https is treated as a separate domain, and they can't access each others' data, the same way yoursite.com can't access a cookie or localStorage from mybank.com. These are rules in place collectively known as the same-origin policy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜