Wechat embedded H5 page, localstorage will be cleared after exit, there is no permanent cache method

problem description

Wechat has embedded H5 page. After exiting, localstorage will be cleared. Is there a permanent cache method

the environmental background of the problems and what methods you have tried

try to use cookie is also invalid, quit and then go in, there is no

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Jul.28,2021

Open a table in the background and save it. According to the openId request for something saved by the user last time


Wechat browser does not know what is going on, it seems that all the data has been cleared out after exiting. As said upstairs, get a table, open more interfaces, and store data on your own server


as well as two front-end storage methods of indexdb and websql, which you can refer to.


Hello, have you solved your problem now


you must clean up localstorage when you exit. A Wechat has stored user information. Isn't it true that A logged out of B directly used A's user information. It's a mess

Menu