Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safari 11 gets SecurityError (DOM exception 18) when accessing localStorage

Tags:

safari

I just upgraded to Safari 11. I've been debugging my WebApp by opening the html file directly with Safari. After the upgrade it gets "SecurityError (DOM Exception 18) The operation is insecure when the app accesses localStorage.

Here's my security policy tag;

<meta http-equiv="Content-Security-Policy"  
  content="default-src 'self' file:// *;  
  style-src * 'self' 'unsafe-inline' 'unsafe-eval';  
  script-src * 'self' 'unsafe-inline' 'unsafe-eval';"  
>  

This worked fine on previous versions of Safari and on Chrome, FIreFox etc.

Any thoughts?

like image 634
srkleiman Avatar asked Sep 22 '17 23:09

srkleiman


1 Answers

I found the answer! Set "Disable local file restrictions" in the Develop menu.

like image 64
srkleiman Avatar answered Nov 04 '22 12:11

srkleiman