16

It's been a while now that I'm facing this issue. From time to time, and on some websites, I have to either:

  • Accept again the cookies, and/or
  • Login again.

I'm using macOS 10.14.4 and Safari 12.1. It's quite annoying. Any suggestion?

11
  • What’s the expiration policy o these cookies that are lost periodically? Are you able to inspect them in Safari and nail down if this is intentional?
    – bmike
    Commented Mar 31, 2019 at 15:20
  • @bmike I don't think that's the problem, since it does not seem to happen at periodical intervals. But I'll keep an eye on that too!
    – wrong_path
    Commented Mar 31, 2019 at 15:22
  • 1
    Perfect +1 I hope to learn something here. My suspicion turns to server side clearing if they are trying to track the source IP and you are mobile or moving to a new network. These things (what an actual web site is today) are so complicated, peeling back the layers server / client / cache / cdn side is quite a chore and needs a lot of technical knowledge.
    – bmike
    Commented Mar 31, 2019 at 15:32
  • 1
    It's a bug with no fix. Safari deletes all my cookies every few minutes regardless of settings. The workaround is to use Safari Technology Preview. Even if you use macOS beta with Safari 13, it still loses cookies. However Safari Technology Preview 13 on stable macOS works. It seems to be related to the default "Safari.app" regardless of version.
    – Monstieur
    Commented Jul 18, 2019 at 9:22
  • 1
    Same here, but not with all web sites. Twitter is fine, though e.g. SoundCloud and StackExchange periodically log me out. Many other anonymous web sites keep showing me the GDPR consent thing despite that I already confirmed (or not) before. I'm beginning to suspect it's a bug with specific web sites or their GDPR implementations, not Safari. Many web sites share the same GDPR JavaScript code. For me it started with Safari 12, still an issue with 13.
    – mojuba
    Commented Sep 29, 2019 at 6:41

5 Answers 5

5

As part of tracking prevention measures browsers may cap expiration at a certain time, especially for client-side written cookies. At the time of writing this is the case for Safari (7 days/24 hours) and Brave (7 days). https://www.cookiestatus.com/ provides an overview.

1
  • 1
    Interesting. Though in Preferences I'ml seeing thousands of cookies from websites I haven't visited in months, but still Safari occasionally drops my login status on some of the frequently visited websites and I have to log in again. I really want an explanation whether Safari is trying to protect me or it's some sort of a glitch. If cookies are regularly purged, why am I seeing thousands of old ones?
    – mojuba
    Commented Feb 2, 2021 at 10:08
3

Do you have the Develop menu turned on? If so, your problem may be due to this known issue. I do not know of a solution other than turning the Develop menu off.

2
  • 3
    Pls explain what you mean by what may happen in sufficient detail in addition to the link so that people can figure out what you mean if the link for some reason gets broken. In addition, the question says nothing about the Develop menu.
    – Alper
    Commented Sep 12, 2022 at 23:46
  • I’ve updated my answer to be clearer. Commented Sep 21, 2022 at 16:29
2

It could be of because reasons mainly,

  1. Any unwanted extension that is supposed to behave this way
  2. Some software running in background to clear caches for freeing up space
  3. Browsing in Incognito Mode
1
  • This is all very generic and not very helpful. The only useful thing here is to clean up extensions.
    – Alper
    Commented Sep 1, 2020 at 10:00
1

Chrome and FF have a feature "Continue where you left off". With this enabled session cookies are not being deleted anymore (see Chrome doesn't delete session cookies).

Check if these affected cookies have "Session" as expire date: probably in this case Safari is working well, the issue is that some sites are saving session cookies instead of long exp date cookies.

1
  • You're not getting it. This is an error where all cookies are just disappearing whenever you revisit the site.
    – Alper
    Commented Sep 1, 2020 at 10:00
1

I've tried the suggestion by @Monstieur in the comments above and I've installed the Safari Technology Preview and that has restored the cookie persistency for me.

I would say that if your Safari is this broken, it can in no way hurt to move over to the preview version. If you want to go further, you could also consider installing a current beta.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .