Wednesday, September 2, 2015

Chrome throws SecurityException when access sessonStorage or localStorage

chrome://settings/content


Under Settings > Privacy > Content settings, change the cookies' settings to "Allow local data to be set" or the second option. Also don't check "Block third-party cookies and site data".


When the option checked, Iframe in Chrome will throw error: Uncaught SecurityError: Failed to read the 'sessionStorage' property from 'Window'.


My understanding is: site data can be sessionStorage or localStorage. Suggest Chrome changes the section title from "Cookies" to "Cookies and site data".:-)


When "Block third-party cookies and site data" is checked, iframe site will be considered third-party.

No comments:

Post a Comment