Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a JavaScript Hook to Indicate to Rendora that Page is Done Rendering #30

Open
zicklag opened this issue Nov 13, 2019 · 2 comments

Comments

@zicklag
Copy link

zicklag commented Nov 13, 2019

I am using Rendora to pre-render my site, but I recently setup a healthcheck to make sure that it is working and I noticed that at certain times of the day the pre-rendered response that Rendora gives does not contain the complete content of the page. I'm pretty sure that the reason for this is that the page has simply not finished asynchronously grabbing the content for the page from the backend API.

The problem is that the only solution to making sure that the content is present before Rendora returns a response is to increase the time that Rendora waits for the page to Render. Increasing the wait time will mean a lower ranking in search engines. If the wait time has to be increased because the page is still rendering that is fine, the problem is that sometimes it needs more time and other times it doesn't. Things like server load at the time can cause a response to take longer than normal and then result in a search engine hit coming back with an empty page.

Is there a way we could possibly add a hook of some sort that my SPA could use to notify Rendora that the rendering is complete? That way, no matter how short or long the page took to render, Rendora will know precisely when to return a response. Obviously it would be optional and every other site you hook up with Rendora would remain unchanged if it doesn't want to use the feature.

To keep things simple, you could even have it setup so that I just console.log("Rendora: ready") and Rendora will instantly return the page when it sees that in the console.

This would make me feel much better about Rendora and knowing that it knows when to return my rendered page.

@jetpack3331
Copy link

Any response here? We're having the same issue while we are loading the content of the website from the API and without setting headless.waitAfterDOMLoad is rendora useless but it looked wery promising!

@zicklag
Copy link
Author

zicklag commented Apr 13, 2020

I'm actually currently moving my workload to prerender.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants