DevTools: the Application Tab
Where the site keeps the GDPR consent cookie, how to delete it to see the banner again, and how the cookie gets into request headers.
About the task
Where the site keeps the GDPR consent cookie, how to delete it to see the banner again, and how the cookie gets into request headers.
Application under test
Now the Application tab: it shows what the site has remembered in your browser.
What is a cookie and why a GDPR banner?
A cookie is a small “name=value” record the browser keeps for a site and sends to the server with every request. GDPR requires asking the user for consent before storing non-essential cookies. The site remembers the choice in a cookie too, for example cookie_consent.
What do “name=value” pairs look like?
Examples: cookie_consent=all — the user accepted all cookies, cookie_consent=necessary — only the necessary ones, lang=en — the interface language, theme=dark — the dark theme. The name is on the left, the value on the right. DevTools shows them in two columns: Name and Value.
The site shows a cookie banner. Press “Accept all” and look at the Cookies table in Application.
Done 0 of 2
bb-food.ee
Application
Cookies
| Name | Value |
|---|
Local Storage
| Name | Value |
|---|
Request headers
No request sent yet.
Response
The site saved your choice: a cookie_consent=all record appeared in Cookies. The banner disappeared because the site found that record. Delete it with the “Delete” button and the banner comes back.
Where in DevTools is the user’s choice in the GDPR banner stored?
How do you repeat the “first visit” scenario with the banner?
Now a “Load products” button appeared on the site. Press it and look at the request headers block in Application.
If the cookie exists, a Cookie: cookie_consent=all line appears in the request headers. The browser sent it to the server itself, you didn’t have to type anything.
How does a cookie get to the server?
Great! Now you know where cookies live in the browser and how they get into requests. We’ll cover the other DevTools tabs later.
Quick reference
DevTools
The developer tools built into the browser. Open them with F12 or Ctrl+Shift+I (Cmd+Option+I on Mac).
Network
A table of the page’s requests. Clicking a row opens Headers (address, method, status), Payload (request body) and Response. The Fetch/XHR filter leaves only API requests.
Application
Browser storage: Cookies, Local Storage, Session Storage. Records can be viewed, edited and deleted.
Cookie
The browser sends cookies to the server with every request.