SessionStorage in Firefox

in firefox 9 when i do:

var msg = sessionStorage.getItem ("message");

The browser asks with an error: "Operation is not supported", firefox does not implement webStorage html5? or is this case intended only for sessionStorage and not for localStorage ?. thanks.

+4
source share
1 answer

Session storage is only available when serving your page from the server - you will find that it does not work if you open the HTML page locally because the session is missing.

In the case of browsers that may not support session storage, you can test this feature:

if (window.sessionStorage) { ... 
+9
source

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


All Articles