Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access denied for localStorage in IE11 but only in desktop mode (not in metro mode)

So I have a site running on Adobe AEM 5.6.1 which checks if localStorage is accessible. The problem for me is it breaks with an "Access Denied" when I access the site from the Desktop version of IE11 (on a HP Elite Pad 900, running windows 8.1 Pro). On the same device it works fine using the metro mode version of IE11.

It also works fine on at least two other computers here, one native PC, one virtualbox:ed on my mac.

I know you are not allowed to access localStorage when running a local html-file but this is running on our server.

What could be different in access rights/security settings for the non-functional browser? Is there any way of checking this programmatically with javascript?

like image 639
primavera133 Avatar asked Nov 26 '13 09:11

primavera133


1 Answers

The way to check for local storage programmatically in JS seems to be to always use a try-catch:

http://mathiasbynens.be/notes/localstorage-pattern#comment-9

like image 200
primavera133 Avatar answered Oct 16 '22 19:10

primavera133