How can I list all cookies for the current page with Javascript? -


Is there a list of all the cookies associated with the current page, with the help of JavaScript? That is, if I do not know the name of the cookies, but they want to get all the information.

You can list cookies for the existing domain:

  Function list cookies () {var thecookies = document.cookie.split (';'); Var aString = ''; (Var i = 1; i & lt; = the.cookies.length; i ++) {aString + = i + "+ thecookies [i-1] +" \ n ";} back aString;}  

But you can not list cookies for other domains for security reasons


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -