This document defines the HTTP Cookie and Set-Cookie header fields.These header fields can be used by HTTP servers to store state (called cookies) at HTTP user agents, letting the servers maintain a stateful session over the mostly stateless HTTP protocol. Although cookies have many historical infelicities that degrade their security and privacy, the Cookie and Set-Cookie header fields are widely used on the Internet. This document obsoletes RFC 2965.
Cookie曾一度用于客户端数据的存储,因当时并没有其它合适的存储办法而作为唯一的存储手段,但现在随着现代浏览器开始支持各种各样的存储方式,Cookie渐渐被淘汰。由于服务器指定Cookie后,浏览器的每次请求都会携带Cookie数据,会带来额外的性能开销(尤其是在移动环境下)。新的浏览器API已经允许开发者直接将数据存储到本地,如使用 Web storage API (本地存储和会话存储)或 IndexedDB 。
注: 客户端维护会话状态
session?
session定义(来源API文档)
Provides a way to identify a user across more than one page request or visit to a Web site and to store information about that user.
#!/bin/bash cat <<eof this is a simple example: this will shows the script running times thank you read the blog. eof sleep 5 echo -E '\E[1,31,40m'"The shell script file $(basename $0) Running time is $SECONDS" tput sgr0
俗话说得好,字不如表,表不如图,怎能不来张图呢:
这个变量也是蛮给力的最起码省去你的几行代码,好了本篇就到这里落笔了,哦是关机了
记住初心,默默前行。 change the world.