(1) Cookie: it is a part of THE HTTP protocol. When storing cookies, you can set the expiration period, and it will be automatically destroyed after expiration. If no expiration time is set, it will be destroyed when the browser closes. The stored data in the cookie is sent to the server with each HTTP request. (The storage capacity of cookies is relatively small, about 4 K) (2)LocalStorage: the data is stored on the local disk of the computer and needs to be manually deleted. Only strings can be stored. (LocalStorage has a large storage capacity of about 20 M) (3)SessionStorage: the data is stored in the memory of the page. The data will be destroyed according to the closing of the page. Only strings can be stored. (SessionStorage has a small storage capacity of about 5 M) (4)Session: the data is saved to the server, and the Session will be invalid when the window is closed. It does not support cross-domain request and can store any type of data. (Large storage capacity)