1

We have developed a website and it uses JavaScript library to query database and display the data in HTML page. When you go to the website, you need to search for something in order to retrieve the data. so by default website doesn't display any data and it needs users to perform action.
The search result data is not visible in HTML view source as it uses JavaScript.
So, the search engines have no visibility as to what our website used for and data used in order to redirect more visitors.

Secondly, I wonder how search bots/engine crawl the websites with non-static content and understand enough about the website to redirect users.

1
  • I don't see anything in the question relating to the title. Please make sure you either add more details or change the title of the question. Commented Jan 6, 2021 at 20:07

2 Answers 2

1

from what i see from your question what you need to do is send requests to your server to query data from your database and show it to you client in real-time.For that i would recommend that you use web sockets(such as socket.io) or AJAX so that you could update your website seamlessly

Sign up to request clarification or add additional context in comments.

2 Comments

Please give some more details as to how that would work. As a picture is a thousand words, so is clarity to a thousand thank-you's.
That's much better, although I wouldn't recommend sockets for that, as web sockets are more for frequent and short requests (like chat posts).
1

From what I have researched, crawlers actually don't read dynamic content. Instead, they use this technique called dynamic rendering.

Dynamic rendering has to do with the server itself. It checks each request and if it determines it to be a bot, then it will send static HTML content to the bot. Otherwise, it will send normal dynamic content to the user.

Also, google and other search engines make use of meta tags. With meta tags you can define a short description of the webpage which will oftentimes be shown in the search results page.


As for question in the title, you would need to send the search information to a server. From there, you would process the data server-side and send the results back to the client where JavaScript would render it based off of the results.

You should use AJAX for this.

Resources:

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.