cordova-plugin-ionic-webview icon indicating copy to clipboard operation
cordova-plugin-ionic-webview copied to clipboard

Cookies are not set by Javascript document.cookie (iOS)

Open julia-fix opened this issue 4 years ago • 4 comments

Cookies sent by backend are stored, but not the ones set by app itself. The following code:

document.cookie = "notified=1; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT";
console.log(document.cookie);

returns empty string (""). Angularjs $cookies.put doesn't work either.

Also, in Safari web inspector, localhost cookies list stays empty.

Tested on iOS 12.4 device with cordova-plugin-ionic-webview v.5.0.0. No issue on Android.

julia-fix avatar Jul 21 '20 07:07 julia-fix

Me too.Have you solved this problem?

rootgrandfather avatar Aug 09 '20 07:08 rootgrandfather

@rootgrandfather Unfortunately no, rewrited my code to use local storage instead of cookies.

julia-fix avatar Aug 11 '20 13:08 julia-fix

@July- Ok,maybe that's the final way.

rootgrandfather avatar Aug 11 '20 15:08 rootgrandfather

Updating webiew and saw this bug. Any fix with cookies. The reason I was using cookies is so I can set them to expire in a day vs local store that stays forever, or have to store a time and calculate things.
What is the fix/work around for this for cookies? Any idea?

newuser44 avatar Dec 03 '20 18:12 newuser44