@anonymous-piwik-user opened this Issue on January 17th 2013

We're seeing the following message on iPhone while tracking mobile site traffic.
"Error: SECURITY_ERR:DOM Exception 18"

I've debugged the javascript and it seems that although we explicitly set disableCookies in our init code, Piwik still tries to access cookies (if only to expire them). For now I've just wrapped the offending code in a try/catch, but I'd appreciate a more elegant fix in a future release.


if (configCookiesDisabled) {
   // Temporarily allow cookies just to delete the existing ones
   configCookiesDisabled = false;
   try{  
      setCookie(idname, '', -86400, configCookiePath, configCookieDomain);
      setCookie(sesname, '', -86400, configCookiePath, configCookieDomain);
      setCookie(cvarname, '', -86400, configCookiePath, configCookieDomain);
      setCookie(refname, '', -86400, configCookiePath, configCookieDomain);
   }catch(err){}
   configCookiesDisabled = true;
}

Perhaps another parameter to deal with removing existing cookies would be a more explicit approach? configCookiesDisabled && configDeleteCookies ?

Thanks
Keywords: javascript cookie

@mattab commented on January 17th 2013 Owner

can you give background on what is "Error: SECURITY_ERR:DOM Exception 18" and why it could be important to work around this issue ? who does it impact exactly? we never got this report before. thx

@robocoder commented on February 18th 2013 Contributor

Why do you disable cookies? Is the iphone browsing a local file using a file:// url?

@mattab commented on February 21st 2013 Owner

please reopen if you read this and care to provide more info :-)

thanks

This Issue was closed on February 21st 2013
Powered by GitHub Issue Mirror