JavaScript local storage (solve cross-domain issues, session domain and cookies cannot be set from the backend)

1. Method javaScriptThere are four main methods of local caching: cookies sessionStorage localStorage indexedDB cookie Cookie, a type of “small text file”, refers to the data that some websites store on the user’s local terminal in order to identify the user’s identity. It is to solve the problems caused by HTTP statelessness As a small […]

Cookies and Sessions

Expansion of the preface: In the previous stage of learning front-end literacy, the author wrote a simple and easy-to-read confession wall project. The specific front-end code is as follows: <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <title>Confession wall</title> <style> /* * Wildcard selector, selects all elements on the […]

How to use cookies in the Gin framework (session control)

Reference address Set and get Cookie | Gin Web Framework (gin-gonic.com)https://gin-gonic.com/zh-cn /docs/examples/cookie/ What are cookies Cookies can be found everywhere on the Internet, specifically as follows: Keep me logged in Save browser history Big data can be configured as you wish, and messages can be pushed according to your preferences. Shopping website add to shopping […]

Cookies and Sessions

Table of Contents 1. What are cookies? 2. What is Session? 2.1 Session usage process 3. The difference between Cookie and Session 4. Core methods 4.1 Session methods in HttpServlet 4.2 Methods in the HttpSession class 4.3 Methods in Cookie class 1. What is Cookie? Cookies are a mechanism for browsers to store data locally […]