8

I've just setup prerender.io middlewave into my tomcat server (running some java webservices and an angularjs app).

The service (prerender) works as it should and I can see the pages adding to the list (also when I send a request simulation the user agent).

My problem is with the Facebook share button (from addthis).

Basically if I visit a not yet cached page and click the "Share on Facebook" button, it will show me the angularjs template and not the "rendered" one.

The strange thing is that I then can see the page on Prerender.io admin.

It's like it's too slow and it times out. Still I don't know how it get the non-cached version of the page.

After the first wrong call Facebook caches the page so if I don't manually refresh it from the Facebook Object Debugger (https://developers.facebook.com/tools/debug/og/object) the wrong page will stay cached on FB servers until the FB cache is refreshed.

Anyway has any suggestion on how to fix this?

I could pre-cache every page but I will have to deal with new pages and I don't think it's a nice solution.

thanks, Dem

demetrio812
  • 290
  • 3
  • 15
  • Hey! Did you figure this out? I can't even get prerender to list my cashed pages. What did you use as crawlerUserAgents for Facebook? Here is my question, do you mind having a look at it? http://stackoverflow.com/questions/26013475/getting-prerender-io-to-work-with-facebook-crawler-maven-gae – stianlp Sep 25 '14 at 13:09

1 Answers1

1

I have the same issue and it still bothers me a lot.

What you can do is after you create your page (typically your user save something), then you can create a server call to prerender to recache your page. After some time (for example 1 min) you can invoke an another call to facebook to refresh its cache...

The only issue with this, it works only after couple of minutes... :(

Andrej
  • 558
  • 6
  • 14