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
-
What test types are defined in the testing pyramid in levels from bottom to top?
Quality Assurance (QA) Senior -
What parts of URL address do you know and what are they good for?
HTTP protocol Quality Assurance (QA) Junior -
What is query string?
HTTP protocol Quality Assurance (QA) Junior -
What is request payload?
HTTP protocol Quality Assurance (QA) Junior -
What is a keyword USE good for?
MS SQL Server Quality Assurance (QA) SQL Junior