X
Thinta lapha ukuze uye kuveshini yamakhalekhukhwini kusayithi.

Isithangami Sabeseki

Lolu chungechunge lwabekwa kunqolobane. Uyacelwa ubuze umbuzo omusha uma udinga usizo.

Can not get cookie after set by using document.cookie on firefox 57

Kuphostiwe

Hi, I'm writing a web extension and when I opened extension debugging mode through "about debugging".

From console tab, I type "document.cookie = "username=tam;expires=Mon, 23 Feb 2018 17:35:38 GMT;path=/";" and Enter to set cookie. But after set, I type "document.cookie" it return empty string.

And my extension can not set or get cookie from document.cookie

I don't know what happen with cookie that I set.

Hi, I'm writing a web extension and when I opened extension debugging mode through "about debugging". From console tab, I type "document.cookie = "username=tam;expires=Mon, 23 Feb 2018 17:35:38 GMT;path=/";" and Enter to set cookie. But after set, I type "document.cookie" it return empty string. And my extension can not set or get cookie from document.cookie I don't know what happen with cookie that I set.
Ama-screenshot ananyekiwe

Okulungisiwe ngu Tam Vo

Eminye Imininingwane Yohlelo

Isisebenziso

  • I-ejenti Engumsebenzisi: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Eminye Imininingwane

FredMcD
  • Top 10 Contributor
4229 izisombululo 59020 izimpendulo
Kuphostiwe

Post your question in the add-ons forum; https://discourse.mozilla-community.org/c/add-ons

Post your question in the add-ons forum; https://discourse.mozilla-community.org/c/add-ons

Umnikazi wombuzo

I posted on discourse.mozilla.org and hope someone will answer it. Thanks.

I posted on discourse.mozilla.org and hope someone will answer it. Thanks.
cor-el
  • Top 10 Contributor
  • Moderator
17422 izisombululo 157414 izimpendulo
Kuphostiwe

Does it work if you leave a space after the colons?

  • document.cookie = "username=tam; expires=Mon, 23 Feb 2018 17:35:38 GMT; path=/";
Does it work if you leave a space after the colons? *document.cookie = "username=tam; expires=Mon, 23 Feb 2018 17:35:38 GMT; path=/";

Umnikazi wombuzo

It's still not working.

It's still not working.
cor-el
  • Top 10 Contributor
  • Moderator
17422 izisombululo 157414 izimpendulo
Kuphostiwe

I see the username=tam cookie in the Storage Inspector and also in document.cookie.

Make sure you do not run Firefox in permanent Private Browsing mode (Always use Private Browsing mode; Never Remember History) in case that makes a difference.

  • Options/Preferences -> Privacy & Security -> Firefox will: "Use custom settings for history"
  • remove checkmark: [ ] "Always use Private Browsing mode"

Start Firefox in Safe Mode to check if one of the extensions ("3-bar" menu button or Tools -> Add-ons -> Extensions) or if hardware acceleration is causing the problem.

  • switch to the DEFAULT theme: "3-bar" menu button or Tools -> Add-ons -> Appearance
  • do NOT click the "Refresh Firefox" button on the Safe Mode start window
I see the username=tam cookie in the Storage Inspector and also in document.cookie. Make sure you do not run Firefox in permanent Private Browsing mode (Always use Private Browsing mode; Never Remember History) in case that makes a difference. *https://support.mozilla.org/en-US/kb/Private+Browsing *Options/Preferences -> Privacy & Security -> Firefox will: "Use custom settings for history" *remove checkmark: [ ] "Always use Private Browsing mode" ---- Start Firefox in <u>Safe Mode</u> to check if one of the extensions ("3-bar" menu button or Tools -> Add-ons -> Extensions) or if hardware acceleration is causing the problem. *switch to the DEFAULT theme: "3-bar" menu button or Tools -> Add-ons -> Appearance *do NOT click the "Refresh Firefox" button on the Safe Mode start window *https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode *https://support.mozilla.org/en-US/kb/troubleshoot-extensions-themes-to-fix-problems

Umnikazi wombuzo

I setup with your suggestion. In developer tools for web extension, I can not get cookie after set. On developer tool on web I can set and get it. See attachment below.

I setup with your suggestion. In developer tools for web extension, I can not get cookie after set. On developer tool on web I can set and get it. See attachment below.