Interview Q&A / Computer Networks
Computer Networks interview questions
What happens when you open a website, TCP vs UDP, DNS and HTTP.
Prefer rapid revision? Practise Computer Networks short interview answers →
- What is the difference between cookies, sessions and tokens like JWT?
A cookie is just a small piece of data the browser stores and sends back automatically. A session keeps login state on the server and puts only a random session ID in a cookie. A JWT is a signed token that carries the user's data itself, so the server can verify it without a lookup, but it is harder to revoke before it expires.
AdvancedIn-depth5 min read - What is DNS cache poisoning, and how is it prevented?
An attacker tricks a resolver into caching a forged answer, such as a bank's name mapped to the attacker's IP. Later users of that resolver are sent to the fake site. Defences include random source ports and query IDs, and DNSSEC, which signs records.
AdvancedQuick answer1 min read