Difference between Session, HTTP Connection?

前端 未结 1 1732
感情败类
感情败类 2021-02-09 21:25

I have been reading this and this. After reading I found myself very confused with my basics now. Please help me out as it involves the basics of networking and JSPs & Servl

1条回答
  •  日久生厌
    2021-02-09 21:44

    To answer your questions:

    A1: No, next day connection won't be there. Keep-Alive (in HTTP) values are usually low enough to not make it through the day.

    A2: Session is maintained server side. It has nothing to do with communication's Keep-Alive. It has a separate value for its expiry time (depends on how you configure it). You are correct: different tabs, same session, different connections. Usually sessions are glued together using common cookies. That's why when you clean your cookies, you usually loose all your sessions.

    A3: Browser simply does not close the TCP/IP connection. That's how it does it.

    0 讨论(0)
提交回复
热议问题