puppeteer/docs/api/puppeteer.page.reload.md
jrandolf f07ad2c661
fix: update documentation on configuring puppeteer (#9150)
This PR updates the docs regarding configuring puppeteer. In addition,
some changes have been made to the documentation generator to show
default values on the documentation site.

Also fixes: https://github.com/puppeteer/puppeteer/pull/9144
2022-10-24 09:07:05 +02:00

1.9 KiB

sidebar_label
Page.reload

Page.reload() method

Signature:

class Page {
  reload(options?: WaitForOptions): Promise<HTTPResponse | null>;
}

Parameters

Parameter Type Description
options WaitForOptions (Optional) Navigation parameters which might have the following properties:

Returns:

Promise<HTTPResponse | null>

Promise which resolves to the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect.

Remarks

The argument options might have the following properties:

  • timeout : Maximum navigation time in milliseconds, defaults to 30 seconds, pass 0 to disable timeout. The default value can be changed by using the Page.setDefaultNavigationTimeout() or Page.setDefaultTimeout() methods.

  • waitUntil: When to consider navigation succeeded, defaults to load. Given an array of event strings, navigation is considered to be successful after all events have been fired. Events can be either:
    - load : consider navigation to be finished when the load event is fired.
    - domcontentloaded : consider navigation to be finished when the DOMContentLoaded event is fired.
    - networkidle0 : consider navigation to be finished when there are no more than 0 network connections for at least 500 ms.
    - networkidle2 : consider navigation to be finished when there are no more than 2 network connections for at least 500 ms.