SShortSingh.
Back to feed

How Websites Keep You Logged In Through Cookies and Sessions

0
·3 views

Web servers do not inherently remember users between requests because HTTP is stateless, meaning each request is handled independently. To solve this, websites rely on cookies, small data files stored by the browser that can hold items like session identifiers, preferences, and shopping cart contents. In a common server-side session setup, the server keeps records of a user's authenticated session and issues a unique session ID to the browser. The browser then returns this ID with each subsequent request, which lets the server recognize the user and keep them logged in. The article, published on DEV Community, presents this process as a step-by-step flow and presents cookies and sessions as foundational concepts for learning authentication and web security.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

GLM-5.4 Has No Public API Price Yet; Coding Plan Sets Effective Cost

Z.ai has not published a per-token API price for GLM-5.4, which remains unavailable pending a security assessment. As of November 24, 2026, the model is accessible only through the GLM Coding Plan, priced at $18, $80, and $168 monthly across three tiers. Usage draws from credit allowances, with GLM-5.4 consuming credits at roughly two-thirds the rate of GLM-5.3, and off-peak hours costing half the standard rate. Because Z.ai publishes its plan prices and credit formula, users can estimate an effective per-token cost on the plan, though any per-million-token figure for the API would be speculation. Plans are non-refundable, so the company's guidance is to begin with monthly billing.

0
ProgrammingDEV Community ·

Choosing Reliable MicroSD Cards for a Raspberry Pi Homelab

MicroSD cards are the standard storage for Raspberry Pi systems, yet they frequently cause downtime in homelab setups. Cards bundled with kits or left in drawers may not withstand the constant writes of a 24/7 service. Failures usually appear gradually, with cards turning read-only, then throwing filesystem errors, and eventually failing to mount. The guide recommends endurance-rated cards, a capacity of 32 to 128 GB with spare headroom, and verifying authenticity with tools like f3 to catch counterfeits. It also suggests benchmarking random write performance, since small random writes are the main load from databases and containers.

0
ProgrammingDEV Community ·

How to test an AI mock interview tool using a role you already know

AI mock interview tools can look convincing in demos, so the article recommends trialing one on a job you already know well. The author suggests defining the role in advance, preparing a list of stories you can stand behind, and using the same setup you would use before a real interview. Key checks include whether follow-up questions respond to what you actually said and whether the feedback targets specific answers rather than generic advice. Reviewing the recording or transcript for accuracy is also advised before acting on any notes. The piece concludes that a tool is worth keeping only if its questions and feedback reflect your own answers.

0
ProgrammingDEV Community ·

Phishing Is a Domain Security Problem, Not Just a User Training Issue

Commentary argues that blaming users for falling for phishing overlooks structural weaknesses in how domains are trusted and displayed. Attackers can exploit lookalike domains and cloned login pages to capture credentials, even when a self-hosted service itself is well patched. The article advises self-hosters to first secure their registrar accounts with authenticator-app two-factor authentication and registrar lock. It then explains how publishing SPF, DKIM, and DMARC DNS records helps stop attackers from spoofing email sent from a domain.