Cookie是否在服务器IP更改时到期? [英] Do cookies expire on server IP change?

查看:94
本文介绍了Cookie是否在服务器IP更改时到期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将更改网站的服务器,SQL Server也将移至新服务器。网址(域名)不会更改,但IP将会更改。

I am going to change the server of my website and SQL server will move to new server too. The url (Domain Name) wont change but the IP will change.

以前登录的会员会注销吗?我使用 Cookies 来保持用户登录。

Does members who have previously logged in will log out? I use Cookies to keep users signed in.

如果cookie过期,如何执行此任务?我正在使用PHP为用户设置cookie。

If the cookies expires, how can I perform this task? I am using PHP to set cookies for users.

推荐答案

Cookie与主机名而不是IP地址关联。

Cookies are associated with hostnames, not IP addresses.

浏览器不会仅仅因为域移动而使它们失效。这会破坏很多负载平衡系统!

The browser won't expire them just because the domain moves. That would break a lot of load balancing systems!

如果cookie与服务器上的信息有关(例如会话ID) ),而该数据不会传输到新服务器,则连接将会丢失。

If the cookie relates to information on the server (e.g. a session id) and that data doesn't get transferred to the new server, then the connection will be lost though.

这篇关于Cookie是否在服务器IP更改时到期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆