+ 7

Is there a way to use JS cookies in on Sololearn?

I've tried to add a save function to a game, but I'm unable to use JS cookies: I get a access denied Error instead... Is there an other way of creating cookies in JS or could I possibly use another language for that? //Edit: This is the Code I used: var cookie = document.cookie;

8th Dec 2016, 1:26 PM
TheOtherOne
TheOtherOne - avatar
4 Answers
+ 5
It is a chrome bug. Sololearn use chrome JavaScript engine to run JavaScript program. Thats why it show you that error. Also you cannot use navigator api of html5. Because Chrome only support that for secure connection that is https. I have use simple code, here it is document.cookie="name=aditya"; alert(allcookies); Use this below url, maybe it can help you https://github.com/rshf/chromedriver/issues/728
8th Dec 2016, 1:52 PM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 4
wow, I just posted a very very similar question. I will let you know if I find any info
23rd May 2017, 8:00 PM
Russel Reeder
Russel Reeder - avatar
+ 4
https://www.w3schools.com/js/js_cookies.asp <--- read up, found extremely useful
23rd May 2017, 8:44 PM
Russel Reeder
Russel Reeder - avatar
+ 1
window.cookie doesnt seem to bring up an error, while document.cookie does...
23rd May 2017, 8:06 PM
Russel Reeder
Russel Reeder - avatar