{"action":"created","issue":{"url":"https://api.github.com/repos/scrapinghub/splash/issues/238","labels_url":"https://api.github.com/repos/scrapinghub/splash/issues/238/labels{/name}","comments_url":"https://api.github.com/repos/scrapinghub/splash/issues/238/comments","events_url":"https://api.github.com/repos/scrapinghub/splash/issues/238/events","html_url":"https://github.com/scrapinghub/splash/issues/238","id":86558564,"number":238,"title":"Does Splash handle javascript set cookies?","user":{"login":"mappelgren","id":3371852,"avatar_url":"https://avatars.githubusercontent.com/u/3371852?v=3","gravatar_id":"","url":"https://api.github.com/users/mappelgren","html_url":"https://github.com/mappelgren","followers_url":"https://api.github.com/users/mappelgren/followers","following_url":"https://api.github.com/users/mappelgren/following{/other_user}","gists_url":"https://api.github.com/users/mappelgren/gists{/gist_id}","starred_url":"https://api.github.com/users/mappelgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mappelgren/subscriptions","organizations_url":"https://api.github.com/users/mappelgren/orgs","repos_url":"https://api.github.com/users/mappelgren/repos","events_url":"https://api.github.com/users/mappelgren/events{/privacy}","received_events_url":"https://api.github.com/users/mappelgren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-09T11:13:31Z","updated_at":"2015-08-06T21:47:08Z","closed_at":null,"body":"I'm interested in building a scraper that goes through a site and finds what cookies are being set both 1st party and 3rd party. Scrapy's built in cookie middleware only deals with cookies set in http headers (set-cookies). I'm interested in cookies set through other methods, for example javascript. Therefore I wonder, how does Splash/scrapyjs handle cookies set through other means than http headers? Does it set javascript cookies or handle them in any way? Or are they just ignored?"},"comment":{"url":"https://api.github.com/repos/scrapinghub/splash/issues/comments/128518874","html_url":"https://github.com/scrapinghub/splash/issues/238#issuecomment-128518874","issue_url":"https://api.github.com/repos/scrapinghub/splash/issues/238","id":128518874,"user":{"login":"lucaswxp","id":131314,"avatar_url":"https://avatars.githubusercontent.com/u/131314?v=3","gravatar_id":"","url":"https://api.github.com/users/lucaswxp","html_url":"https://github.com/lucaswxp","followers_url":"https://api.github.com/users/lucaswxp/followers","following_url":"https://api.github.com/users/lucaswxp/following{/other_user}","gists_url":"https://api.github.com/users/lucaswxp/gists{/gist_id}","starred_url":"https://api.github.com/users/lucaswxp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucaswxp/subscriptions","organizations_url":"https://api.github.com/users/lucaswxp/orgs","repos_url":"https://api.github.com/users/lucaswxp/repos","events_url":"https://api.github.com/users/lucaswxp/events{/privacy}","received_events_url":"https://api.github.com/users/lucaswxp/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T21:47:08Z","updated_at":"2015-08-06T21:47:08Z","body":"Hey guys.\r\n\r\nFor me, document.cookie appears to be always empty, try this request, for instance:\r\n```sh\r\ncurl -i -X POST -H 'content-type: application/json' -d '{\"js_source\": \"document.body.setAttribute(\\\"data-cookie\\\", document.cookie);\", \"wait\": 3, \"url\": \"http://www.americanas.com.br\"}'  http://localhost:8050/render.html\r\n```\r\nThen `body[data-cookie]` will be empty.\r\n\r\nBut if I do a raw curl request, I get the cookies set back:\r\n```sh\r\ncurl -I http://www.americanas.com.br\r\n> ...\r\nSet-Cookie: MobileOptOut=1; path=/; domain=americanas.com.br\r\nSet-Cookie: b2wChannel=ACOM; path=/; domain=americanas.com.br\r\nSet-Cookie: akaau=1438897818~id=b874481c11a6576d5e992cfba8510912; path=/\r\n```\r\n\r\nAny guidance in how do I get all cookies from the response within splash?\r\n"}}