[英]Does the localStorage get cleared when working with npm live-server?
I am currently working on a basic JS application that requires the usage of DOM storage or localStorage. 我目前正在开发一个需要使用DOM存储或localStorage的基本JS应用程序。 In order to auto-save my changes, I incorporated the npm live-server.
为了自动保存我的更改,我合并了npm live-server。
After I shut down the live-server, I notice that the localStorage gets cleared. 关闭实时服务器后,我注意到localStorage已被清除。 Can you help me understand how this happens under the hood?
你能帮我理解这是怎么发生的吗?
localStorage is stored on the client side not on the server side, so each browser decides. localStorage存储在客户端而不是服务器端,因此每个浏览器都会决定。 Read at MDN: localStorage
在MDN上阅读: localStorage
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.