"Set Cookies" not working with firstparty.isolate
See original GitHub issueI cannot get the “Set Cookies” functionality to work. I’ve tried doing the same in a fresh firefox profile and it didn’t work either. What I’m trying to achieve is to reproduce a functionality of an userscript I wrote that sets a single cookie on youtube website.
// ==UserScript==
// @name yt-dark-theme
// @namespace Violentmonkey Scripts
// @match https://www.youtube.com/*
// @grant none
// ==/UserScript==
//
function setCookie(name, value, expires, path, domain, secure){
cookieStr = name + "=" + value + "; ";
if(expires){
expires = setExpiration(expires);
cookieStr += "expires=" + expires + "; ";
}
if(path){
cookieStr += "path=" + path + "; ";
}
if(domain){
cookieStr += "domain=" + domain + "; ";
}
if(secure){
cookieStr += "secure; ";
}
document.cookie = cookieStr;
}
setCookie("PREF", "f1=50000000&f6=400", false, "/", ".youtube.com", false);
Here are the settings I tried using (one of many attempts).
I suppose I’m doing something wrong. Could You point me in the right direction? As far as I know, there’s no guide on how to use this functionality and mozilla’s cookies.set() documentation didn’t get me anywhere either.
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (10 by maintainers)
Top Results From Across the Web
How to enable First-Party Isolation in Firefox - gHacks
To enable FPI, users must set “privacy.firstparty.isolate” to true by double-clicking it. The second parameter — “privacy.firstparty.isolate.
Read more >Doesn't work with Firefox's privacy.firstparty.isolate = true #75
With privacy.firstparty.isolate = true the cookie count is always zero and cookies are not deleted despite notification claiming that they were.
Read more >How to enable First-Party Isolation in Firefox? - Super User
1 Answer 1 · To enable FPI set privacy.firstparty.isolate to true . · If you are having problems logging into any websites due...
Read more >How does Firefox's "first-party isolation" feature function?
From a cursory look, they isolate the cookies (and other data) on silos based on the domain you navigated to. So eg. a...
Read more >How Different Browsers Handle First-Party and Third-Party ...
Simply go to Settings > Advanced > Site settings > Cookies and set Block third-party cookies to On. how chrome browser handles cookies...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Seems like it was the domain pattern’s fault, but I have noticed another thing. “Set Cookies” doesn’t work with
privacy.firstparty.isolate
set totrue
. Should I open a new issue? Is this even fixable?I know about this one, but I only use youtube as a search engine and play videos in mpv instead. As long as the videos themselves are hosted on google servers I see no benefit to using it over youtube.
Thanks for this one, seems to react faster than my userscripts when it comes to redirections, and I do quite a few of those. Same thing goes for the “Set Cookies” functionality - youtube isn’t the only place where I’d like to use it.
Whoops. There was something missing in the implementation - fixed in version 0.101.
Works for me like that: