Accessing Authentication Cookie with js

  • Thread starter Thread starter Khafancoder
  • Start date Start date
K

Khafancoder

Hi guys,

is it possible to access ASP.Net authentication cookie through
javascript ?

thanx
 
Kanfancoder,
A "Cookie is a Cookie is a Cookie". Since Javascript can read and write
cookies, the short answer is "yes, you can".
However - being able to decrypt an authentication cookie via client script
is another issue.
Peter
 
Thanks, but i heard abt HttpOnly cookies that aren't accessible
through JS, i want to know if asp.net uses these kind of cookies or
not !?
 
Khafancoder said:
Thanks, but i heard abt HttpOnly cookies that aren't accessible
through JS, i want to know if asp.net uses these kind of cookies or
not !?

Most likely not. It's only supported by IE6+ and no other browsers as
far as I can tell. As it's not standard, any browser can choose to
ignore the cookie if you add the HttpOnly option.
 
Thanks, very useful.

Most likely not. It's only supported by IE6+ and no other browsers as
far as I can tell. As it's not standard, any browser can choose to
ignore the cookie if you add the HttpOnly option.
 
Back
Top