Domain wide local memory loss for I6 and IE7?

In our current project, we use HTML 5 localStorage with a return to the global store for Firefox and user data behavior for IE6 / IE7. The return is through a JS script called jStorage .

This worked fine until we started testing in IE6 / IE7, although it "works", it turns out that there is a restriction in the behavior of user data that blocks it, so the repository can be installed and read only at the same URL or as MSDN puts it "For security reasons, the UserData repository is only available in the same directory and with the same protocol as the repository ."

Therefore, if I set the value on one page and then move on to another, although I am on the same site, this will not work. Which for us largely makes it unsuitable for use as a failure for local storage, which is limited for each domain.

Has anyone encountered this problem before and found a decent solution?
Any ideas or thoughts will be appreciated.

+6
source share
3 answers

Remy Sharp polyfill will do it.

https://gist.github.com/remy/350433

+1
source

if the problem is to get data on two pages on different paths, but in the same domain you can try one of them (note: I have not tried: I'm just trying to be creative)

  • Use URL redrawing (with .htaccess ) so you can access /path1/page1 and /path2/page2 with one path-rewritten/page1 and path-rewritten/page2

  • if you are in /path2/page2 , you can load the invisible iframe by loading the page in /path1 where you will get the data stored in some data structure that you pass in the parent document.
    Since page1 and page2 - for each hypothesis - in the same domain, you can make page1 and iframe share with each other using javascript.

Good question.

0
source

Theoretical Solution:

  • dynamically create a hidden "proxy" iframe, access to a static document extracted from your location, say HTTP: /domain/proxy.html
  • Proxy access to DOM element in iframe to save / receive data
0
source

Source: https://habr.com/ru/post/908407/


All Articles