Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

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
Đính kèm ảnh chụp màn hình

Tất cả các câu trả lời (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