chrisguttandin / angular-prerender

A command line tool to prerender Angular Apps.
MIT License
125 stars 7 forks source link

How to use this plugin with https://prerender.io/ #94

Closed ajay-whiz closed 4 years ago

ajay-whiz commented 4 years ago

Hi

We have developed an app in angular and now planning to use https://prerender.io/ in our app. So, is it possible to use this plugin (angular-prerender) with https://prerender.io/. If yes then how can we pass prerender.io token to this plugin. Please add some code snippet for this implementation with prerender.io token and angular-prerender plugin.

Thanks, Ajay

chrisguttandin commented 4 years ago

Hi @ajay-whiz, I never used prerender.io which is why the following might be wrong. But as far as I understand it's a different concept.

With prerender.io you can use a client side Angular app and prerender.io will take care of rendering it in a real browser to get the static HTML. But it will only do that when the site gets requested by certain bots. The average user will not notice any difference.

angular-prerender on the other hand is part of the build process. It can render your whole application as static HTML. Once that is done everyone will get it. The search engine bots will see the HTML they expect and the human users will get a faster response. But angular-prerender will need a server-side application (generated with ng-universal) since it renders your page in Node.js and not in a browser.

This is just a personal opinion, but I guess angular-prerender works better if your content doesn't change very often. Whereas prerender.io probably works better if the content changes frequently.

chrisguttandin commented 4 years ago

I'm closing this issue now. I hope I've answered your question. Please let me know if not.