ASP技术的Cookie VS JavaScript的饼干 [英] asp cookie vs javascript cookie
问题描述
是asp的饼干和JavaScript饼干之间的差异。
通过ASP技术的Cookie我的意思是使用是Response.Cookie创建的cookie
&安培;哪一个更好?
what is the difference between asp cookie and javascript cookie. by asp cookie i mean cookie created using response.cookie & which one is better ?
推荐答案
有不在底层饼干本身,只方法设定/读出它的差。两者都是,事实上,客户端的cookie发送到和请求/响应头的浏览器。
There isn't a difference in the underlying "cookie" itself, only the approach to setting/reading it. Both are, in fact, a client-side cookie sent to and from the browser in the request/response headers.
不同的是,该cookie可以在客户端的JavaScript(例如,使用的document.cookie
)或在ASP.NET服务器上例如,使用操作( Request.Cookies时
和 Response.Cookies
)。
The difference is that the cookie can be manipulated on the client in javascript (e.g. using document.cookie
) or on the server from within ASP.NET (e.g. using Request.Cookies
and Response.Cookies
).
在事实上,你可以在同一个cookie的,如果你真的想都混合ASP.NET和Javascript的cookie处理。
In fact, you could mix both ASP.NET and Javascript cookie manipulation on the same cookie if you really wanted to.
[顺便说一句 - 我想你指的ASP.NET。虽然你只是在你的问题的文字说的ASP,这个问题被标记为ASP.NET]
[BTW - I assume you were referring to ASP.NET. ALthough you only say ASP in your question text, the question is tagged as ASP.NET]
这篇关于ASP技术的Cookie VS JavaScript的饼干的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!