zoukankan      html  css  js  c++  java
  • cookies分类

    Cookie总是保存在客户端中,按在客户端中的存储位置,可分为内存Cookie和硬盘Cookie。

    内存Cookie由浏览器维护,保存在内存中,浏览器关闭后就消失了,其存在时间是短暂的。硬盘Cookie保存在硬盘里,有一个过期时间,除非用户手工清理或到了过期时间,硬盘Cookie不会被删除,其存在时间是长期的。所以,按存在时间,可分为非持久Cookie和持久Cookie。

    Session cookie

    session cookie, also known as an in-memory cookie or transient cookie, exists only in temporary memory while the user navigates the website.[16] Web browsers normally delete session cookies when the user closes the browser.[17] Unlike other cookies, session cookies do not have an expiration date assigned to them, which is how the browser knows to treat them as session cookies.

    Persistent cookie

    Instead of expiring when the web browser is closed as session cookies do, a persistent cookie expires at a specific date or after a specific length of time. This means that, for the cookie's entire lifespan (which can be as long or as short as its creators want), its information will be transmitted to the server every time the user visits the website that it belongs to, or every time the user views a resource belonging to that website from another website (such as an advertisement).

    For this reason, persistent cookies are sometimes referred to as tracking cookies because they can be used by advertisers to record information about a user's web browsing habits over an extended period of time. However, they are also used for "legitimate" reasons (such as keeping users logged into their accounts on websites, to avoid re-entering login credentials at every visit).

    These cookies are however reset if the expiration time is reached or the user manually deletes the cookie.

  • 相关阅读:
    java基础72 junit单元测试
    java基础71 XML解析中的【DOM和SAX解析工具】相关知识点(网页知识)
    java基础70 负责静态的网页制作语言XML(网页知识)
    管理表空间和数据文件概要
    关于在博客中记录解决报错的问题
    ORACLE监听配置及测试实验(2)
    ORACLE监听配置及测试实验
    ORACLE network environment
    ORACLE INSTANCE与EM系统
    ORACLE DB体系结构
  • 原文地址:https://www.cnblogs.com/loanhicks/p/7495586.html
Copyright © 2011-2022 走看看