Some personalized settings are often used in website development and cookie information is required. However, it is found that the cookie information is large and every request must be sent to the server, which is unnecessary, because this information does not need to be processed by the server, it is a waste of resources and there is no need to send each request... some personalized settings are often used in website development and cookie information is required. However, it is found that the cookie information is large and every request must be sent to the server, which is unnecessary, because this information does not need to be processed by the server, it is a waste of resources and there is no need to send so much information to the server each request.
Is there a way to set a cookie that is used only on the browser but not sent to the server?
Reply content:
Some personalized settings are often used in website development and cookie information is required. However, it is found that the cookie information is large and every request must be sent to the server, which is unnecessary, because this information does not need to be processed by the server, it is a waste of resources and there is no need to send so much information to the server each request.
Is there a way to set a cookie that is used only on the browser but not sent to the server?
- 6 hours ago
- Comment
- Reply
Please log on first and then comment
Sort by default
6 answers
The answer is helpful to people and has reference value.1The answer is not helpful. It is a wrong answer.
Adoption
No, so there is a cookie-free statement.
It is only used on the client. You can use localStorage/useData.
You can use local storage to search for local js storage by yourself without using cookies.
What you are talking about is localStorage and sessionStorage.
The browser can disable cookies.
H5 local storage mechanism can be implemented
The cookie does not exist.