Coder Social home page Coder Social logo

Comments (6)

gwuhaolin avatar gwuhaolin commented on June 23, 2024

is there any error log out by koa-seo?

from koa-seo.

Raxxor avatar Raxxor commented on June 23, 2024

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.

gwuhaolin avatar gwuhaolin commented on June 23, 2024

see chrome-render'doc

useReady: boolean whether use window.chromeRenderReady() to notify chrome-render page has ready. default is false chrome-render use domContentEventFired 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.

Raxxor avatar Raxxor commented on June 23, 2024

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.

gwuhaolin avatar gwuhaolin commented on June 23, 2024

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.

gwuhaolin avatar gwuhaolin commented on June 23, 2024

notice window.chromeRenderReady() has been change to window.isPageReady = 1

from koa-seo.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.