哪一个负责http session ID的生成?客户端浏览器、服务器或两者?

Which one is responsible for the generation of http session ID? The client browser, the server, or both?

我正在开发一个 Java Web 应用程序,它涉及在每个 http 会话的基础上分配服务器资源。因此,http 会话 ID 将成为数据库 table 的键的一部分,并且它在 table 中的唯一性是必须的。 Java HttpSession.getID() 方法的描述声称此 ID 是唯一的,因此服务器端应该有某种方式来强制执行这种性质。但是在客户端浏览器上,除非明确请求要使用的新会话,否则 HTTP 会话通常由多个浏览器共享 windows。这表明浏览器也可以主动控制会话的使用。那么哪一方负责HTTP会话ID的生成呢?还是双方的共同努力?访问同一网站的不同计算机上的浏览器是否有可能意外生成相同的会话 ID?

会话 ID 由服务器生成,通常在 his/her 首次访问网站时授予访问者。

A session ID is a unique number that a Web site's server assigns a specific user for the duration of that user's visit (session). The session ID can be stored as a cookie, form field, or URL (Uniform Resource Locator). Some Web servers generate session IDs by simply incrementing static numbers. However, most servers use algorithms that involve more complex methods, such as factoring in the date and time of the visit along with other variables defined by the server administrator.