I have a query regarding Node.js, I understand it is an easy way to build scalable network programs. Also It says It runs on server side. So I am trying to accomplish something jquery or javascript cant do. i.e., to embed content inside html tag.
for eg:
<html>
<body>
<div class="content"> I need the node.js code to embed this content here. </div>
</body>
</html>
Not only in our browser. But for crawlers and bot. I used http://web-sniffer.net/ to check website http://nodecellar.coenraets.org/#wines which is developed using node.js. The dynamic contents are not read by bots and crawlers. Is there a solution for this in node.js?
Is that possible in Node.js?
Thanks in advance.
There are numerous template libraries listed in the Node Package Manager registry. Most of them should be able to solve this problem.
Note that Node is server-side technology, does not run in the browser and does not run inside a webpage (but can output HTTP resources, including HTML documents). Any server technology could do this task.
http://nodecellar.coenraets.org/#wineswhich is developed using node.js. The dynamic contents are not read by bots and crawlers.
Node may or may not be used on the page (it is impossible to reliably tell from the client), but it does generate all the real content client side. You need to follow the principles of Progressive Enhancement and Unobtrusive JavaScript to resolve that issue.