Comments (22)
Are you setting window.prerenderReady = false;
in your javascript? Or on the initial page that comes back from the server in a <script>
tag?
How long do your pages take to load? It could be that we're hitting a timeout and just saving the HTML because we assume that you might have forgotten to set window.prerenderReady = true;
from prerender.
I tried setting window.prerenderReady = false;
in my javascript and in my initial page that comes back from the server in a <script>
tag.
My page loads in about 500ms-1sec max.
from prerender.
Can you email me some of your URLs so I can test them and make sure phantomjs isn't having any problems? [email protected]
Thanks!
from prerender.
Cool, sent! Thanks Todd. Let me know how I can help!
from prerender.
Hey, same issue in here! I just sent you a mail with the link. thanks for watching!
from prerender.
Same here! window.prerenderReady = false
is being set inline in script tag inside <head>
section.
Then I set it to true
after first dispatcher:dispatch
event, triggered by Chaplin.mediator
.
I'm using Chaplin.js (Backbone based) with RequireJS (and almond compiler).
from prerender.
That should be fine. Do you mind sending me an email with some of your URLs so I can debug them? [email protected]
from prerender.
Looks like it's no longer an issue for me. I didn't actually find out the root cause of the issue since I just got rid of the page that had problems.
from prerender.
+1 same here. email sent @thoop
hope you can help. thx.
from prerender.
I would like to clarify one thing. From the documentation:
When we see window.prerenderReady set to false, we'll wait until it's set to true to save the HTML.
though looking at prerender source code, it seems that prerender waits for all requests to finish, and only then starts checking if prerenderReady is set to true.
Am i correct?
from prerender.
Correct. We only use window.prerenderReady as a signal to tell us to wait longer than usual and you cannot use it to make us save the page earlier than we normally would. This might change in the future to make it work both ways but that's how it currently works.
from prerender.
@thoop just to check, has the behaviour you described in your latest comment been implemented in any way or not?
from prerender.
window.prerenderReady is still just a signal to tell us to wait longer and is used in combination with waiting for all ajax calls to complete. We do not currently have a way to force the page to complete before all ajax calls are complete. Sorry for the inconvenience!
from prerender.
i found this issue is closed!
is this issue fixed? or it will be fixed ?
if i set pageDoneCheckTimeout much large, and window.prerenderReady = true;
, the page wait for Infinite (pageDoneCheckTimeout) .
how can i do with the problem ???
from prerender.
If you set pageDoneCheckTimeout to a very large number then of course the page won't complete because you are never executing the check to see if the page is done loading. window.prerenderReady is working as expected.
from prerender.
@ccqgithub, I have built a project which is to solve AJAX call & Timeout in both jQuery & AngularJS.
It may be helpful for you.
Please see https://github.com/dingyuliang/prerenderready-javascript
from prerender.
from prerender.
Cool! The Prerender server already counts all requests in flight (all requests, not just ajax) and then saves the page a short time after that number reaches zero. So counting all ajax calls in the javascript as well might be a little overboard.
from prerender.
Thank you very much.
When I was testing last month, I hosted Prerender.io service on my local, it didn't do like this.
I will test this later.
I agree if Prerender Server already does this, we don't this any JavaScript level logic.
from prerender.
hi @thoop,
I am working on a Meteorjs project where the server calls are mostly through websockets instead of ajax/http.
I am seeing that some of my pages are rendering properly and some are cached before the window.prerenderReady is set to true
please review http://foctest.meteorapp.com/service/Helper-or-Maid/Dubai?_escaped_fragment_= (not rendered and cached properly)
http://foctest.meteorapp.com/service/Furniture-Assembly/Dubai?_escaped_fragment_= (is working fine, same route)
also review http://foctest.meteorapp.com/p/auntest130?_escaped_fragment_= (which takes more time yet is rendered properly)
from prerender.
@ansaries Looks like it's rendering correctly when I test it against our service directly, so it looks like that could have been a timing issue where the page took too long to load. Try recaching that page and see if it looks better. If so, then you'll want to make sure your pages are loading correctly before they timeout.
from prerender.
Locking this conversation as it's become a dumping ground for issues. Please create a new issue or email us at [email protected]. Thanks!
from prerender.
Related Issues (20)
- Restarting Chrome at almostly every request HOT 2
- Chrome died immediately after restart... stopping Prerender HOT 1
- Unable to fetch Useragent header on Prerender Server
- How to do this with static site?
- Error on running prerender locally HOT 4
- Not able to set default mobile user-agent in prerender
- Cacheing of SPA JS and CSS bundles HOT 1
- Timed out waiting for Chrome connection after Restarting Chrome HOT 16
- Prerender stopped working with ReactJS
- Sending of Custom Headers
- Update package version to include #748
- HTTP code returned 200, even if the page is a 404
- Is hosting prerender locally affects the pre-existed caching with prerender.io service? HOT 1
- Using PRERENDER_TOKEN
- Crawling does not work properly when using own deployment of prerender HOT 8
- Retrying Connection...undefined HOT 9
- doesnt work!!!!!! HOT 2
- blockResources not working? HOT 3
- Syntax Error when using extraChromeFlags option HOT 1
- 5.21.1 unstable Chrome HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prerender.