this post was submitted on 31 Oct 2023
932 points (99.9% liked)
Technology
59298 readers
4665 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related content.
- Be excellent to each another!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, to ask if your bot can be added please contact us.
- Check for duplicates before posting, duplicates may be removed
Approved Bots
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Every request your browser makes to a website is like the first time that website has ever seen you. Each image, content request, etc. All from somebody completely new and unknown[1].
The only way a website can identify you as a user is to ask your browser to store a unique ID (generated by the website) that you can then present with each request. This is a 'cookie'. It gives you a temporary identifier that can be used to recognize later requests as coming from the same person.
Without a cookie you couldn't login to any sites. Even if you're not logging in, without a cookie the website couldn't remember what your language preferences were (important in Quebec or other government sites), or timezone, etc. It couldn't even remember that you wanted to reject all "non-essential" cookies and would prompt you on every page request. Every single request would be from an unknown person visiting the site for the first time.
[1] Yes, I've simplified some with keep-alive etc.
Just to add up, the "session" cookie is a special case for the browser which identifies them as such, and handles them as temporary because usually it expires in a few hours. Also, they must have an expiration, and it clears them as soon as you close your browsing session no matter if they expired or not.