Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Ulteriori informazioni

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

why does firefox create a new cookie instead of over writting the existing one?

more options

I am using javascript to set a cookie like this: `document.cookie = "name=" + window.location.href;`

I'm not sure if it matters but the javascript is in a child theme in Wordpress.

In Chrome and Safari it will create one cookie and update that one cookie when I changes pages on the site. In Firefox it creates a new cookie with the same name and new value.

Can I even fix this?

screenshot of the recurring cookies attached

I am using javascript to set a cookie like this: `document.cookie = "name=" + window.location.href;` I'm not sure if it matters but the javascript is in a child theme in Wordpress. In Chrome and Safari it will create one cookie and update that one cookie when I changes pages on the site. In Firefox it creates a new cookie with the same name and new value. Can I even fix this? screenshot of the recurring cookies attached
Immagini allegate

Tutte le risposte (2)

more options

No idea. This for Support not Developing.

Check this site out and look around or post : https://stackoverflow.com/questions/10819152/how-do-you-make-a-cookie-to-be-used-in-a-firefox-session and here : https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/cookies/set

Please let us know if this solved your issue or if need further assistance

more options

You may notice each cookie has a different path. Firefox defaults the path to the current page's path if you do not specify a consistent path like

document.cookie = "name=value;path=/"

in your cookie assignment.

See: https://developer.mozilla.org/docs/Web/API/Document/cookie#new-cookie_path