官术网_书友最值得收藏!

Persistent and nonpersistent cookies

Cookies are divided into two main categories. Persistent cookies are stored on the client device's internal storage as text files. Since the cookie is stored on the hard drive, it would survive a browser crash or persist through various sessions. Different browsers will store persistent cookies differently. Internet Explorer, for example, saves cookies in text files inside the user's folder, AppData\Roaming\Microsoft\Windows\Cookie, while Google Chrome uses a SQLite3 database also stored in the user's folder, AppData\Local\Google\Chrome\User Data\Default\cookies. A cookie, as mentioned previously, can be used to pass sensitive information in the form of session ID, preferences, and shopping data among other types. If it's stored on the hard drive, it cannot be protected from modification by a malicious user.

To solve the security issues faced by persistent cookies, programmers came up with another kind of cookie that is used more often today, known as a nonpersistent cookie, which is stored in the memory of the web browser, leaves no traces on the hard drive, and is passed between the web browser and server via the request and response header. A nonpersistent cookie is only valid for a predefined time specified by the server.

主站蜘蛛池模板: 山阴县| 祁阳县| 黄浦区| 临潭县| 防城港市| 新泰市| 吉林市| 肇源县| 怀宁县| 平定县| 三原县| 驻马店市| 黄浦区| 六盘水市| 宣城市| 宁蒗| 永兴县| 廊坊市| 商城县| 东明县| 兰坪| 兰西县| 仙游县| 隆昌县| 隆德县| 巴彦县| 深圳市| 苗栗市| 开封县| 宁波市| 城口县| 石林| 兴隆县| 扎兰屯市| 申扎县| 澜沧| 专栏| 宜兰市| 临洮县| 镇远县| 十堰市|