From 543c30a78742479d449524ff4b60bd31d1397313 Mon Sep 17 00:00:00 2001 From: recry Date: Thu, 1 Oct 2015 15:15:19 +0200 Subject: [PATCH 1/2] Local cookies on IE11 are global. Local cookies (file://...) on IE11 with path "/" are global. Setting empty path does not working. --- src/angular-local-storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/angular-local-storage.js b/src/angular-local-storage.js index 0e3048e..4a90bb3 100644 --- a/src/angular-local-storage.js +++ b/src/angular-local-storage.js @@ -308,7 +308,7 @@ angularLocalStorage.provider('localStorageService', function() { expiry = "; expires=" + expiryDate.toGMTString(); } if (!!key) { - var cookiePath = "; path=" + cookie.path; + var cookiePath = !!cookie.path ? "; path=" + cookie.path : ""; if(cookie.domain){ cookieDomain = "; domain=" + cookie.domain; } From bdd67028f5c7b32eeee426d280f8d01ec9b51af6 Mon Sep 17 00:00:00 2001 From: recry Date: Fri, 2 Oct 2015 09:14:20 +0200 Subject: [PATCH 2/2] Update angular-local-storage.js --- src/angular-local-storage.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/angular-local-storage.js b/src/angular-local-storage.js index 4a90bb3..7c8d915 100644 --- a/src/angular-local-storage.js +++ b/src/angular-local-storage.js @@ -308,7 +308,10 @@ angularLocalStorage.provider('localStorageService', function() { expiry = "; expires=" + expiryDate.toGMTString(); } if (!!key) { - var cookiePath = !!cookie.path ? "; path=" + cookie.path : ""; + var cookiePath = ""; + if(!!cookie.path){ + cookiePath = "; path=" + cookie.path; + } if(cookie.domain){ cookieDomain = "; domain=" + cookie.domain; }