失去饼干从http SWICH时到https [英] Loosing cookie when swich from http to https
问题描述
我在我的网站上的选项来改变语言。
I have the option in my site to change language.
当用户更改语言,它存放在cookie中,所以其他页面知道要显示的语言!
When user change language ,its saved in cookie, so the other pages know which language to display!
有些网页是HTTPS。而在这些网页我没有得到所选择的语言。
Some of the pages are in https. And in these pages I don't get the selected language.
有没有办法使用 HTTP $ C $相同的cookie C>和
HTTPS
?
推荐答案
没有,没有。饼干是本地域名,以及HTTP和HTTPS网页被认为是在不同的领域。
No, there isn't. The cookies are local to the domain, and the http and https pages are considered to be in different domains.
https的页面是加密的,所以发送相同的cookie的HTTP请求会泄露该信息,并危及加密。
The https pages are encrypted, so sending the same cookies for a http request would leak that information, and compromise the encryption.
这篇关于失去饼干从http SWICH时到https的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!