饼干和子域 [英] Cookies and subdomains

查看:151
本文介绍了饼干和子域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

能否浏览器来两个站点之间在同一个顶级域名共享?说 www.example.com secure.example.com
我们正在研究实施非安全内容缓存,需要隔离安全内容到其他域。
确实该cookie需要哪些参数?我使用asp.net

Can a cookie be shared between two sites on the same top level domain? Say www.example.com and secure.example.com ? We are looking into implementing a cache for non-secure content, and need to segregate secure content to another domain. What parameters does the cookie need? I'm using asp.net

推荐答案

是的,可以。用途:

Response.Cookies("UID").Domain = ".myserver.com"

这篇关于饼干和子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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