HTML rendering waits for the page to load

Like URLs, HTML now waits for the load event by default, so its scripts, styles and images are ready before your scripts run and the screenshot is taken.

Changelog1 min read

Written by

Dmytro Krasun

Published on

The wait_until option is documented to default to load, and it did for URLs. For html, though, the API didn’t wait for anything unless you set wait_until.

So HTML that loaded scripts, styles or images from other URLs could be captured before they were ready. A request with scripts that called the page’s own code could also run before that code was loaded and fail: the API then waited for wait_for_selector until it timed out.

Now HTML waits for the load event by default, like a URL. If the page doesn’t finish loading within the navigation timeout, the API renders it as it is instead of failing, as it does for URLs.

HTML that loads slow external resources may now take longer to render. If you don’t need to wait for them, set wait_until=domcontentloaded.

Read more product updates

New features, bug fixes, and optimizations...

View all product updates
Custom headers in Zapier

Custom headers in Zapier

Send custom HTTP headers when capturing website and animated screenshots with ScreenshotOne's Zapier integration.

Read more

1 min read

Resend organization invites

Resend organization invites

Organization owners and admins can now resend pending member invites from the dashboard.

Read more

1 min read

Updated the official JavaScript and TypeScript SDK

Updated the official JavaScript and TypeScript SDK

The SDK now explains connection failures such as "ECONNRESET" and can retry them automatically.

Read more

1 min read

Automate website screenshots

Exhaustive documentation, ready SDKs, no-code tools, and other automation to help you render website screenshots and outsource all the boring work related to that to us.