Skip to content

BrowserFrame.reload()

David Ortner edited this page Sep 28, 2025 · 4 revisions

Reloads the current URL.

Signature

reload(options?: IGoToOptions): void;

Parameters

Parameter Type Description
options? IReloadOptions Options (Optional)

Returns

void

Example

import { Browser } from "happy-dom";

const browser = new Browser();
const page = browser.newPage();

// Reloads the current URL.
await page.mainFrame.reload({
   referrer: 'https://github.com/capricorn86/happy-dom/',
   referrerPolicy: 'origin-when-cross-origin'
});

await browser.close();

Clone this wiki locally