K
K
KirillMilano2017-01-22 11:00:27
JavaScript
KirillMilano, 2017-01-22 11:00:27

How does twitch.tv set the unique_id and session_unique_id cookies?

Good afternoon. For some manipulations with twitch that are not available through the api, you need to figure out how twitch sets cookies for clients. Namely, two values ​​are of interest: unique_id and session_unique_id. I'm trying to figure it out, I can not understand exactly where they are installed. When entering any channel, for example here https://www.twitch.tv/doublelift with cleared cookies, the following happens. The page is loaded in English. The initial request to the page itself does not set the cookie. Next, some scripts, css and other things are loaded - the browser does not send cookies in outgoing requests, and does not accept anything. And then, from a certain moment in each request, it starts sending cookies, i.e. by this point, at least the unique_id variable has already been set.
b4d9e38be96e42c887c5b56c70dcbf32.png96e3e52a0d884ab7b6a37f98c48ebe23.png
I tried to find a file or xhr that sets cookies - I did not find it. I also tried to find a piece of javascript code that would set these cookies - I also did not find it. The feeling that this moment is somehow hidden from the firebug and the chrome console in principle. Can you help me figure out how the site sets these cookies?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2017-01-22
@mak_ufo

It is possible that this is happening on the server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question