I had a funny little incident over the weekend while using iOS. One night, I decided to control my Safari cookies by having the browser always block cookies. Everything seemed okay at first. Then the next day, I cleared my website history and data. I then found myself unable to log into any website in Safari. I’ll replicate my steps below in case you run into the same issue.
Blocking Safari Cookies
You can block Safari cookies on iOS by going into Settings > Safari > Privacy & Security section. There are four options to choose from: Always Block, Allow from Current Website Only, Allow from Websites I Visit, and Always Allow.
Normally, I use the setting Allow from Current Website Only. This allows first-party cookies and blocks third-party cookies. The difference is that third-party cookies come from trackers and advertisers, while first-party cookies come from the website you actually visit.
Cookies R Us
Cookies aren’t necessarily bad, at least first-party cookies. It’s just a way for your browser to “remember” your settings for a particular website. For example, when I visit Google search, I get an annoying message where Google nudges me to use Chrome.
I press the button to say no, and I never get the pop-up again. This is because Google set a cookie that remembers that I pressed no, so I don’t have to keep pressing it every time I visit Google search. But when you always block cookies, Google shows the window each time, treating each visit as a new session.
In the same way, when you log into a website, there is often a little button that says “Remember Me.” This is a persistent login cookie that saves your information in the browser, so you don’t have to login each time.
I found an Apple support page where it discusses Safari cookies and the different settings you can use. Under the Always block section, it gives the caveat: “This may prevent some websites from working properly.”
Apparently, not being able to log into websites is an example of improperly working. Maybe if I hadn’t cleared the website data, which includes cookies, I wouldn’t have run into this problem. So my tip is to accept first-party cookies and block third-party cookies.
“So my tip is to accept first-party cookies and block third-party cookies.”
Any tips for webside coders?