I want to delete a cookie named "_ga" which is a cookie of Google Analytics programatically. * jQuery is not an option this time.
I understand we can delete a cookie by 1) setting a past expiration date 2) setting max-age=0. (reference)
However, when I tried on Chrome, it doesn't delete the cookie. To test its behavior, I set another cookie with the same name with null value.
document.cookie = "_ga=;";
I assume it will overwrite the existing cookie with the same name, but both cookies exist.
>document.cookie
<- "_ga=GA1.3.1150830279.1524399211; _ga="
Is it an expected behavior? If yes, how can I delete the cookies?