knubie
knubie

Reputation: 231

Cookies getting cleared after some period of disuse

I have a Cordova app that uses WKWebView.

I'm using permanent cookies to authenticate with my (rails) server.

The cookies are stored and sent with subsequent requests, and even continue to be sent after app restarts.

However after some time of not using the app, usually a few days, no cookies are sent with any requests, and I need to re-authenticate to get new cookies.

The cookies are set to expire in 20 years, so I think there must be some other mechanism that is clearing the cookies.

Has anyone else experienced this?

Upvotes: 0

Views: 289

Answers (1)

Matthias Winkelmann
Matthias Winkelmann

Reputation: 16384

Apple says this about cookies (on MacOS, but it’s equally valid on iOS)

enter image description here

(It’s a pop up on this page)

So it’s a bit arbitrary and hard to predict which cookies get ejected after a week, but a test/dev setup (raw iPs etc.) probably looks rather sketchy to the AI. If users regularly return, and the cookies are first-party, this shouldn’t happen.

Upvotes: 1

Related Questions