Does Meteor + Cloudflare + nginx + prerender.io work?

Anyone have expreience of using prerender.io?

I am using meteor + cloudflare + nginx + prerender.io (https://atmospherejs.com/dfischer/prerenderio) but I can’t get it working. Prerender.io seems to have problem caching my website. The status just stays in “caching”.

Anyone idea how to set this up correctly?

If you temporarily disable Cloudflare caching (turn off in DNS page), does it work?

@powderkeg No it doesn’t work.

I also tried their recache API $ curl -H “Content-Type: application/json” -d "{“prerenderToken”: “YOUR_TOKEN”, “url”: "http://www.example.com/"}" http://api.prerender.io/recache
and still no luck.

Hmmm… Could it be that prerender.io is being blocked somewhere along your side?

I’m not using cloudflare nor nginx but my issue might be tangentially related so thought I’d share the fix in case it helps you. FWIW, in my case prerender.io was caching the page before it fully rendered (the page in question was fairly heavy).

Add this to your HTML (I have mine in <head>):

<script>
window.prerenderReady = false;
</script>

Then flag as true after the page is rendered (I have mine in an onRendered callback):

window.prerenderReady = true;

You may need to re-cache everything for it to register.

If that doesn’t work, ping support…they’re super responsive.

Good luck!

Prerender.io did have some problems of caching the webpage and it has been resolved on their side.