Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

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

@zicklag

Description

@zicklag

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions