Closed berkaytheunicorn closed 7 years ago
Hi @berkaey
I am trying to understand your question. Generally, phantomjs is fairly slow, about 5-6 seconds delay. This package includes caching capability, so the second request to the same URL will result in the same response.
As you can see at:
https://github.com/jazeee/jazeee-meteor-spiderable/blob/master/lib/phantom_script.js#L21
, phantomjs will not respond with a ready status until the app sets a flag to true. Meteor.isReadyForSpiderable = true
The reason for this is that you want your pub/subs to complete prior to rendering. You would set the boolean to true after your subscription has completed. To do otherwise, can result in an incomplete page rendering. See https://github.com/jazeee/jazeee-meteor-spiderable/blob/master/README.md#important
I guess when all pub/sub ready it just triggers to return what we have right? so I need something to override this and would return page only it sees the Meteor.isReadyForSpiderable = true but only for some url pattern. is it possible to do it? btw with same code and same remote db the page will just works on local.
I think it would be good to see some code example. Also could test an example in the examples
directory: https://github.com/jazeee/jazeee-meteor-spiderable/tree/master/examples
At the end of the day, this package should wait for Meteor.isReadyForSpiderable = true
, and if it doesn't see that in 30 seconds, then it fails with information regarding PhantomJS problems: See https://github.com/jazeee/jazeee-meteor-spiderable/blob/master/lib/server.coffee#L174
Put together a simple Meteor app on github for me to see. I can better understand your problem with code.
Hello @berkaey ,
Any news on your end? Is this solved?
Closed due to silence at issue owner end. Feel free to reopen it in case if the issue still persists on your end.
sorry for late response but we ended up using Galaxy ;)
Hey,
I've been testing the package and most of the time its works but sometimes (in my case it is important) it just doesn't wait 30 sec. after 6-7 sec it just load the page. but in my case it just shows the loader normally page can load in a sec. or 2. So I'm not sure how to handle this. any idea?