You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -336,11 +335,23 @@ INFO: Redirect requested but followRedirects is disabled</source>
336
335
</question>
337
336
<answer>
338
337
<p>
339
-
Make sure (a) that you are using the latest version of HtmlUnit, and
340
-
(b) that you are calling WebClient.close()
341
-
(or use <ahref="http://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html">try-with-resources</a>)
342
-
when you are finished with your WebClient instance.
338
+
Make sure
339
+
<ol>
340
+
<li>that you are using the latest version of HtmlUnit, and
341
+
<li>that you are calling WebClient.close() (or use <ahref="http://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html">try-with-resources</a>) when you are finished with your WebClient instance.
342
+
<ol>
343
+
</p>
344
+
<p>
345
+
Like real browsers HtmlUnit maintains a history for every window to be able to support the back() action. If you don't need this
346
+
you can disable the history by
343
347
</p>
348
+
<source><![CDATA[
349
+
try (WebClient webClient = new WebClient(browserVersion)) {
0 commit comments