What are cookies and how are they used in HTTP protocol?

Experience Level: Junior
Tags: HTTP protocol Quality Assurance (QA)

Answer

  • Cookies are small text blocks that are being sent in a HTTP requests to the web server and in a HTTP response from the web server.
  • Each cookie consists of key-value pair, list of all cookies is represented by the HTTP header.
  • Cookie is usually created on the server (by the on-line application back-end)
  • Cookie can be created on the client-side (by the browser)
  • Cookies are persisted in the browser
  • All cookies can be seen in Chrome DevTools

 

Cookie example

Cookie: _ga=GA1.2.329801189.1515987465; ai_user=Xabc|2018-02-11T23:24:12.252Z;

Related Quality Assurance (QA) job interview questions
HTTP protocol for beginners
HTTP protocol for beginners

Are you learning Quality Assurance (QA)? Try our test we designed to help you progress faster.

Test yourself