- Print
- DarkLight
- PDF
Empty or partially rendered pages
If you find that Prerender.io returns empty or partially rendered pages, here are a few things to check first.
Prerender.io fails to detect the ready-ness of the page.
Prerender.io contains advanced logic to detect if the page has finished rendering or not, but some web pages use some custom loading flows or constant polling that may trick Prerender's logic; thus, it fails to make a decision on the ready-ness of the page.
If that happens, Prerender.io may grab the page content too early and return a partially rendered (or even empty) page to crawlers.
If you think your site falls into this category, there is a way to help Prerender.io do a better job. When Prerender.io starts to render a page, it checks if the page JS context has the boolean variable window.prerenderReady
set to false
(not undefined, but false, it's important). If this variable is present, Prerender.io will wait for this value to turn true
before grabbing the rendered content.
To implement prerenderReady properly, you should add:
<script> window.prerenderReady = false; </script>
as high to your head
section as possible, preferable right after the <head>
tag. Then make sure you only set this variable true
when your page is finished rendering, and it's safe for Prerender to grab the content. This is possible in an async call that runs very late on your page. Prerender.io will then wait a small amount of time to ensure all the calls are finished and save your page.
Page rendering times out
Prerender.io has a 20 seconds default render timeout. If your page fails to load and/or finish rendering at this time, Prerender.io will likely grab and cache a partially rendered page. To identify such issues, you should look at your Prerender crawl and recache stats and review the Response Time column of your pages.
We made it relatively easy for you to point out problems by highlighting them in red:
Any URLs with a response time close to or over 20 seconds is a potential timeout and should be checked. Unfortunately, we can't help much with these. Better caching or involving a CDN may help, but as many pages we see, there are many solutions to this problem.
There is an error on the page:
We often observed that a site loaded by a desktop browser works just fine, but when Prerender tries to fetch it, it fails with some weird JS error. Prerender.io fetches your site with a customized headless Chrome from various locations and various IP addresses. This can lead to some errors that are not easy to find.
CDNs
Some CDNs block requests from non-standard user agents (see Prerender user agents here). Many sites load JS bundles from CDNs to speed up site loading. Still, we have seen cases where those CDNs blocked Prerender.io to access that site, so although the site works perfectly for end-users, Prerender.io still fails to render it.
Missing browser capabilities
There were cases where a site used WebGL or other special capabilities to render the page. Please note that Prerender.io browsers run in headless mode and with no GPUs attached, so these special capabilities may not be available.
Geo-blocking
Prerender.io data centers are all around the globe. If your site is geo-blocked from some regions (e.g., only available from the US), it can also lead to render issues. If you reach out to us using this link and explain the situation, we can set up your account to force Prerender.io to request your pages from a specific location.
Currently, only Global or US-only settings are available, but we'll implement EU-only soon too.