How to save cookies when the app write to document.cookie?
0
votes
1
answer
1023
views
I'd like to understand how to save cookies that the application writes to
document.cookie
(https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie) , as I've noticed that the common methods wget/curl to save to a file does not work for this particular case, it seems.
Assuming the web app writes cookies:
document.cookie = name + "=" + value + expires + "; path=/";
For example,
wget --keep-session-cookies --save-cookies cookies.txt "http://foobar/app-generates-cookie.html "
or the curl,
curl --cookie-jar cookie.txt http://foobar/app-generates-cookie.html
Both wget/curl does not work for the app case above.
Asked by punkbit
(111 rep)
Oct 31, 2019, 10:49 PM
Last activity: Nov 1, 2019, 12:36 AM
Last activity: Nov 1, 2019, 12:36 AM