View cookie files in Google Chrome browser


When visiting various websites to check information, there will always be a pop-up box asking whether cookie information can be saved; so I am curious to see where the cookie file exists. This article is mainly based on this question.

Students who do not understand cookies can read the following introduction:

Baidu Encyclopedia cookie introduction

Automatically created by the browser:
When the server receives an HTTP request, the server can set a Set-cookie option in the response header, and the browser will automatically save the cookie after receiving the response. Send the cookie information to the server through the request header.

environment

MacBook pro
Google Chrome Version: 114.0.5735.106 (official release) (x86_64)

step

  1. It can be managed through the settings of the browser: the browser visits the following address

chrome://settings/cookies

  1. The actual path of the cookie file:

windows:

C:\Users<username>\AppData\Local\Google\Chrome\User Data<profile>\Network\Cookies

macOS:

~/Library/Application Support/Google/Chrome/Default/Cookies

  1. open view

It is actually a SQLite3 database.
Therefore, it cannot be opened directly, and needs to be opened and viewed through other programs, such as: DB Broswer For SQLite

https://sqlitebrowser.org/dl/

Mac can be installed via Homebrew:

brew install --cask db-browser-for-sqlite

After being opened by the tool, some field information has been encrypted and saved;

expand

Chrome+postman automatically brings in cookies

Introduce the interceptor plug-in to automatically bring the login information in the cookie into postman. chrome

1. postman installation: browser

Open chrome://extensions/, just drag the downloaded postman plugin into it. cookie

2. Postman interceptor installation: curl

Open chrome://extensions/, just drag the downloaded Postman interceptor plugin into it. post

3. After the Postman interceptor is installed, an icon will appear in the upper right corner of the chrome browser, click to open it. test

4. Open postman and open the interceptor plugin url

5. If you log in to the test account in the chrome browser, and then use postman to test the interface that depends on the login status, you don’t need to verify it, because the interceptor has automatically synchronized the login status in the browser to postman. plug-in

It is found that clicking the curl request to open the browser will also directly bring in the cookie

reference

Browser Storage] Detailed Explanation of Cookies
https://eiam.topiam.cn/blog/about-chrome-browser-cookie-problem/

Guess you like

Origin blog.csdn.net/u014163312/article/details/131295680