DISABILITARE ADBLOCK

ADBlock sta bloccando alcuni contenuti del sito

ADBlock errore
5 Characters minimum

Question

StackOverflow Main source: https://stackoverflow.com/questions/4202523

How to check if .ASPXAUTH cookie exists with javascript

I have a strange problem. I want to check if .ASPXAUTH cookie exists with javascript. I do it like this:

authx = document.cookie.indexOf(".ASPXAUTH" + "=");  

and the 'authx' value is always -1. But if I tray to find some other cookie like:

foo = document.cookie.indexOf("bar" + "=");  

it works. Is there some restriction between javascript and .ASPXAUTH cookie???

Leggi tutto

Solution

I solved it. The problem was, that I had set the

HttpOnly = true;  

which prevents the javascript accessing the cookie. I just set it to false and it works.

USEFUL SOURCES

StackOverflow