본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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
첨부된 스크린샷

모든 댓글 (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