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

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.

主站蜘蛛池模板: 沅江市| 民勤县| 左权县| 兴国县| 张家川| 金沙县| 南丰县| 房产| 保康县| 东丰县| 峡江县| 丰顺县| 清涧县| 兴和县| 柳河县| 津南区| 玛纳斯县| 抚远县| 宁乡县| 建阳市| 绍兴市| 东宁县| 西宁市| 金阳县| 常德市| 和林格尔县| 抚松县| 溆浦县| 肥西县| 克什克腾旗| 且末县| 德格县| 新巴尔虎左旗| 大丰市| 柯坪县| 南岸区| 蒙城县| 高陵县| 十堰市| 盐山县| 连平县|