Skip to content

Client's history clear alternative #8704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion components/browser_kit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,9 @@ also delete all the cookies::
$client = new Client();
$client->request('GET', 'http://symfony.com');

// delete history
// reinitializes the browser state (history and cookies are deleted)
$client->restart();
// which internally calls history->clear() and cookieJar->clear()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this line:

which internally calls history->clear() and cookieJar->clear()

It explains an internal coding details (which makes docs hard to maintain). And we already explain above that this clears cookies and history, so maybe it's unneeded. Thanks!


Learn more
----------
Expand Down