javascript - how to identify a cookie is from client-side or server-side? - Stack Overflow

how does thebrowser differentiate a cookie is from client-side created (JavaScript) or server-side cr

how does the browser differentiate a cookie is from client-side created (JavaScript) or server-side created (ASP.NET). Is it possible to delete cookie created from server side in client side and vice versa, I'm struggling to delete a cookie was created from client-side using javascript in ASP.NET code-behind.

how does the browser differentiate a cookie is from client-side created (JavaScript) or server-side created (ASP.NET). Is it possible to delete cookie created from server side in client side and vice versa, I'm struggling to delete a cookie was created from client-side using javascript in ASP.NET code-behind.

Share Improve this question edited Apr 11, 2012 at 19:34 abatishchev 100k88 gold badges301 silver badges442 bronze badges asked Apr 11, 2012 at 6:25 Chandru velanChandru velan 1461 gold badge4 silver badges23 bronze badges 1
  • asp cookie vs javascript cookie – Kashif Commented Apr 11, 2012 at 6:37
Add a ment  | 

2 Answers 2

Reset to default 6

how does the browser differentiate a cookie is from Client side(javascript created) or serverside created (Asp).

It doesn't. A cookie is a cookie.

The closest it es is the HTTP Only flag, which allows a cookie to be hidden from JavaScript. (This provides a little defence against XSS cookie theft).

it is possible to delete cookie created from server side in client side and vice versa

Yes. A cookie is a cookie. (Again, client side code can't touch an HTTP only cookie)

As far as I know it is possible if there is not property HttpOnly owasp wikipedia.

In chrome, for the cookies, there is a field - Accessible by script, which indicates if HttpOnly is set.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745131168a4612980.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信