search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

1 answers
Q&A Why does the number of cookies in the "Cookie" request header exceed the number of cookies set in the "set-cookie" response header?

0

I am a newbie to web crawling, so my understanding of http requests is very shallow. When I inspect certain requests I send to a website, such as add to cart, the dev tools show that there are more values ​​ in the "Cookie" header of the request, which are set by "set -cookie" response header is set.

How does this work?

More specifically, one cookie in the "set-cookie" header of the response will contain the cart id, but when looking at all cookie values ​​in the request header, there will also be a cart id in the "Cookie" header , but there are other cookies such as "checkout session lookup" and "checkout session token".

However, these cookies are not set in the "set-cookie" header of the response, so how do they get there?

Suppose I want to grab the complete "Cookie" value of all cookies included in the request header, not just those cookies in the response header. Is there a way to do this?

Thank you for your help!

Your Answer
submit

1 answers
0

I think this may be related to the JavaScript on this page. For example, the following code sets a new cookie: document.cookie="username=John Doe";

Therefore, cookies can not only be sent through request headers.

To get the full cookie, I think you might need a headless browser.

2024-04-06 10:58:23

submit

Popular tool

vc9-vc14 (32+64 bit) runtime library collection (link below)

vc9-vc14 (32+64 bit) runtime library collection (link below)

Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit

VC9 32-bit

VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version

PHP programmer toolbox full version

Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit

VC11 32-bit

VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use