Git Product home page Git Product logo

Comments (2)

loringray avatar loringray commented on July 28, 2024
  1. 无状态协议:每个请求都是独立的,协议对于事务处理没有记忆能力,服务器根据请求返回发送数据,但是发送完不会记录任何信息;客户端必须每次都带上自己的状态去请求服务器;无状态则意味着需要重传。

  2. HTTP 是无状态协议 (标准的 http 协议是无状态的、无连接的)

  3. 解决方案:
    (1)、Cookie
    (2)、通过 Session 会话保存

from trisome.

Moannas avatar Moannas commented on July 28, 2024

无状态协议:
是指协议对于事务处理没有记忆功能。缺少状态意味着,假如后面的处理需要前面的信息,则前面的信息必须重传,这样可能导致每次连接传送的数据量增大。在服务器不需要前面信息时,应答就较快,就是每个请求都是独立的,与前面的请求和后面的请求都是没有直接联系的。

http1.x是无状态协议,http2是有状态协议

解决方法:cookie、session、token

from trisome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.