There are many local storage areas that need to be used when developing mobile projects recently. It's all about just remembering the user data for the current open window, so I chose to use the sessionstorage. The following scenarios are used:
A.html page needs to record a data {a:1,b:2};
sessionStorage.setItem("data","{a:1,b:2}");
B.html page out of use;
sessionStorage.getItem("data"); // 获取结果为null
Question: If the project is not a single page re-application, AB is two HTML files that need to jump to the href. We will find that some of the Andiron system's browsers on page B get the result is null (such as: Vivo mobile phone comes with the window browser of the world).
After analysis, this is not the browser does not support Sessionstorage, because you can still get to sessionstorage this object. But because Sessionstorage is a current window of the data storage format, some browsers in the jump to the new page when his system is open a new WebView, the original off, it is equivalent to our browser opened a new window. In this way he is in conflict with our sessionstorage principle, and in the new page of course it is not available. So it is recommended that you do not use sessionstorage when you do the mobile side of the project if it is not a single page re-application. Use with caution!
About mobile-side compatibility issues with Sessionstorage