How do I delete cookies from a web browser and change the user agent in Python 3+ without using mechanize? I'm not going to be accessing the web through Python, I would just like my browser (Firefox or Chrome) to delete cookies and change my user agent for example at every startup (I can do the startup bit, just not the rest!)
Asked
Active
Viewed 177 times
1 Answers
1
set the Expires
attribute to a date in the past (like Epoch):
Set-Cookie: name=val; expires=Thu, 01 Jan 1970 00:00:00 GMT
Read more here: Correct way to delete cookies server-side