phantom-pool icon indicating copy to clipboard operation
phantom-pool copied to clipboard

How to clear data from Phantom Instances

Open prastut opened this issue 8 years ago • 3 comments

If that is an issue for you, make sure you clean up any sensitive data on the phantom instance before returning it to the pool.

As mentioned in the repo, that previous instances might have data left in it, how to clear them? Could you point me to any example?

Thank you for your time. :)

prastut avatar Jul 09 '17 22:07 prastut

I don't know how to do it but PRs are welcomed :)

olalonde avatar Jul 10 '17 01:07 olalonde

I think the things which may persist on the phantom instance are Cookies and Local Storage.

For cookies, the path is clear: Call .clearCookies() before returning the instance to the pool.

For Local Storage, it seems to be a little more complicated, and I actually haven't tried to do it myself. But here are a couple articles on clearing local storage and specifically in phantomjs.

mikedaly avatar Jul 10 '17 21:07 mikedaly

I think that would be an interesting feature to merge if someone's willing to do a PR. It would be better if that behavior was turned off by default though for backwards compatibility.

olalonde avatar Jul 10 '17 21:07 olalonde