angular-local-storage icon indicating copy to clipboard operation
angular-local-storage copied to clipboard

Allow cookie expiry not to be set (session cookie)

Open jonagoldman opened this issue 10 years ago • 1 comments

Cookies with no expiration are useful for one time only cookies. Also known as session cookie. The cookie is cleaned up by the browser when the window is closed.

jonagoldman avatar Aug 06 '15 13:08 jonagoldman

I found a workaround, setting localStorageServiceProvider.setStorageCookie(0, '/') will set a Session Cookie, that will be destroyed once the window is closed.

So the problem here is in the documentation, it says: _number of days before cookies expire (0 = does not expire). default: 30_ this is not correct, setting default to 0 will create a Session Cookie.

jonagoldman avatar Aug 06 '15 14:08 jonagoldman