How did you get prerender.io working?


#1

I am giving up on meteor SEO. Nothing I try works (maybe I just have a bad period as nothing seems to work for me anymore with meteor and I am so pissed spending time on things that should be trivial - so long productivity). So I tried spiderable with phantomjs but it just gave me strange errors so I just gave up. Besides it’s not recommended solution. Then I decided to try prerender.io. I tried atmosphere packages but they don’t seem to be not supported anymore. So now I installed prerender-node npm package. However it’s not exactly clear how should I use it as there are no documentation for meteor. Right now I do something like this:

import prerenderIO from 'prerender-node';

Meteor.startup(function () {
    prerenderIO.set('prerenderToken', "mytoken");
    prerenderIO.set('protocol', 'https');
    prerenderIO.set('host', 'myapp.com');
    WebApp.rawConnectHandlers.use(prerenderIO);
});

Is that’s correct? I then go to my prerender.io account and cache a homepage. When I go to raw html from prerender.io - it is simply a page with empty body. How did you get prerender to work with your app? What’s your setup? I don’t find any useful documentation whatsoever.


#2

Hi there! Todd from Prerender.io here. Happy to help on the Prerender side of things. If you cached a URL from our UI and it had an empty body when you click “Raw HTML”, that sounds like a different issue that could be caused by a javascript error. Can you send the URL you are testing to support@prerender.io? I’ll be happy to check on that for you.

I’ll also test your setup while I’m at it, but you can test to see if it’s working by going to an ?_escaped_fragment_= URL. If your URL looks like:

http://www.example.com/

Then you’d want to view the source of:

http://www.example.com/?escaped_fragment=

If you see the prerendered page, then it worked! Otherwise if you see the <script> tags still, then the middleware didn’t get run correctly.

Best,


#3

Is prerender.io still needed for google indexing? I seem to remember reading that google doesn’t use escaped_fragment anymore?

I’ve been looking into using prerender, but I’m just not sure if it is worth it anymore.


#4

Yes, Prerender.io is still needed for Google indexing. If you have a small website, you might be able to get by with Google executing the javascript themselves. If you have a medium/large website, then you still need to serve prerendered pages to Google.

We’ve found that when Google is executing the javascript themselves, they crawl very slowly which can make it hard for your site to get indexed properly. When serving cached pages from Prerender, Google can crawl extremely fast through your site.


#5

Hi thread, I am pär.
I’ve got both rendered html and seeing the source when appending the escaped_fragment to the url.
Still google didn’t index anything, what should I be looking at to solve this please?


#6

Did you ever figure this out?

I am getting a blank page too. Well… my app shows up as blank, and the only thing that shows up is a 3rd party chat box I use.

https://www.decentralized.tech/market-data?escaped_fragment=

I am using the dferber:prerender package, and have the following in my settings.json enviroment variables (obviously, in the actual file I have my key token, not “key”):
“PRERENDERIO_TOKEN”: “key”

I am messing around with “window.prerenderReady = false;” right now, but my first test was unsuccessful. First test I put this in a onBeforeAction hook:
window.prerenderReady = false;

Then this in a onAfterAction hook:
window.prerenderReady = true;

Now I am going to test it out with “window.prerenderReady = true;” in the onRendered hook on my template. This is kind of frustrating!!


#7

Hello Coinhoader,
I saw your your website with your uel : https://www.decentralized.tech/market-data?escaped_fragment=
( very nice by the way :slight_smile: and apparently you have solved your problem, do you have information to share, I have the same problem with: an empty page on the “Raw HTML pages link” in my admin prerender.io?o admin ?

Thank you !!


#8

Hello,

I could not get the Meteor prerender package working. That was the issue. I ended up using the prerender NPM module. It sucks because I do not get free prerender even though I host through MDG, but at least it works…

I hope this helps. Sorry to take a long time to respond. :slight_smile: