Why can't Mini Program use session?

1. Is the request made by Mini Program such a process as Mini Program-> Mini Program server-> developer server?
2. Is it because of the 1 process that Mini Program can"t use session directly?
3. Solve why Mini Program can"t use session

Mar.03,2021

first of all, you need to know what session, is. Mini Program just uses different ways to deal with session.

session translates as "conversation". The whole process from entry to exit is a session, but http is a short link and will be disconnected every time you visit, so when you log in for the first time and visit again, the server does not know "you are you".

session is to solve the question of "who are you?"

traditional session is implemented using cookie, while cookie is sent to the server with a http request by default, and this cookie is your session credential . But WeChat Mini Programs's wx.request does not support cookie because WeChat Mini Programs has his own certificate https://developers.weixin.qq..

Menu