Monday, 9 March 2015

Storage of IE9 error


below code works with chrome well.

            if(typeof(Storage) !== "undefined") {
                // Code for localStorage/sessionStorage.
                console.log("xxx = ",localStorage.getItem("col.Store"               ) );
            } else {
                // Sorry! No Web Storage support..
                alert("Sorry! No Web Storage support..");
            }

However, that will broken IE9.

The if statement is the key thing,


No comments:

Post a comment