Generate Static HTML From Client-Side JavaScript Generated Site -
i'm generating entire site using index.html js scripts.
the js creates html content based on json data received via server-side api. works great client-side , makes site load speed , interaction fast there snag... when crawler comes index page see blank page.
the obvious solution provide xml site map static versions of pages. problem is... how generate static versions of each page when generated client-side , logic , templates client-side?
this not new issue... i'm sure generating pages dynamically client-side has hit issue , solved thought i'd ask dev community before diving in , trying solve this.
i've managed generate static pages client-side output using phantomjs , capturing html output after page , js has finished loading/executing. method slower , unlikely scale it's option can think of far.
the site receives on 10,000 page views day on 8,000 unique visitors pages updated regularly new comments / posts created , these changes added queue gets process in separate server generate static pages phantom.
the other way can think of doing create node.js process uses same jsrender library , builds html output template files based on data, time consuming set , not generate exact same output dynamic site creates. google may frown on me serving static pages don't represent dynamic version "normal" visitors can see.
this seems unsolvable issue. either generate pages entirely server-side, or crawlers cannot index pages. :(
Comments
Post a Comment