Basically, I start using node and then run phantomjs. To take cookies from node to phantom, I code:
page.set('phantomcookies', nodecookiejar, callback);
But when I checked the cookies, there were so many phantomjs cookies than node cookies. Then I coded:
page.clearCookies(function(err){
page.set('phantomcookies', nodecookiejar, callback);
}
The callback, obviously, is that the program is working in the correct order. But, I still have a few extra phantomjs cookies that I find really confusing since phantoms just have to copy cookies from node via node - phantom is a simple bridge (as far as I know). Any ideas will help. Thank.