Comments (6)
is there any error log out by koa-seo?
from koa-seo.
Sorry about my mistake, since we do not use KOA directly, so I test chrome-render under your projects, which Koa based on it. There is no obviously error reported.
ChromeRender.new({}).then((chromeRender)=>{
htmlString = chromeRender.render({
// url: 'http://vue-prerender.deboy.cn/titleFromRouterDefine',
url:'http://www.chenggua.com',
});
console.log(htmlString);
With compared these, result shows vue-prerender.deboy.cn
rendered successfully while www.chenggua.com
outputs just like "curl" result. It was rendered failed with other headless-chrome solution either. Seems there might be some confilct or capacity problems.
from koa-seo.
see chrome-render'doc
useReady
:boolean
whether usewindow.chromeRenderReady()
to notify chrome-render page has ready. default is false chrome-render usedomContentEventFired
as page has ready.
www.chenggua.com render data after domContentEventFired
and chrome-render use domContentEventFired
default. You should use useReady
: true and call window.chromeRenderReady()
in you web page after data has rended out.
from koa-seo.
Thanks for your kindly help, it was rendered successfully after set useReady:true
and add window.chromeRenderReady()
.
BTW, is there any solution without add window.chromeRenderReady()
in html pages? If we want to setup a seo-render server, without original html modification.
from koa-seo.
without add window.chromeRenderReady()
can not guarantee correctness in some complex scenes as I don't know when is your page's data is ready, so I give this power to user.
from koa-seo.
notice window.chromeRenderReady()
has been change to window.isPageReady = 1
from koa-seo.
Related Issues (6)
- LIGHTHOUSE_CHROMIUM_PATH need to be set? HOT 4
- Detecting browser window size HOT 2
- 关于给搜索引擎静态化页面得疑问 HOT 1
- 有考虑出个 express 版本的中间件吗 HOT 3
- 将ua伪装成crawler怎么判断是否被爬 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 koa-seo.