angular-local-storage
angular-local-storage copied to clipboard
Allow cookie expiry not to be set (session cookie)
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.
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.