Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript & SEO

Tags:

javascript

seo

How can I tell if a google bot is reading my javascript generated content?

I have an AJAX script that generates some text dynamically on a page... this content does not change by user, but simply by date/time.

I am not sure how I can tell if google sees it.

like image 1000
fighella Avatar asked Aug 20 '09 05:08

fighella


People also ask

What is the JavaScript used for?

JavaScript is a text-based programming language used both on the client-side and server-side that allows you to make web pages interactive. Where HTML and CSS are languages that give structure and style to web pages, JavaScript gives web pages interactive elements that engage a user.

Which is better HTML or JavaScript?

JavaScript simply adds dynamic content to websites to make them look good. HTML work on the look of the website without the interactive effects and all. HTML pages are static which means the content cannot be changed. It adds interactivity to web pages to make them look good.

Is JavaScript and HTML same?

Both of these are computer languages that help in programming, but there is a major difference between JavaScript and HTML. While JavaScript (abbreviated as JS) is a scripting language, HTML is a markup language. We use HTML to create web pages or web applications.

Is JavaScript easy to learn?

Arguably, JavaScript is one of the easiest programming languages to learn, so it serves as a great first language for anyone brand new to coding. Even the most complex lines of JavaScript code can be written one by one, in fragments. It can also be tested in the web browser at the same time.


2 Answers

Search engine bots don't have javascript, so they won't see any content that was dynamically added to your page via AJAX, etc. In your browser options, turn off Javascript and reload your website. All that they'll see is the content and the links there.

The solution: on your page, in the plain HTML place a link to a page which shows the rest of your content (the stuff that you would load via AJAX), then have Javascript replace that link with the content. The search engine bots will see the link and follow it, indexing all your content. Just make sure that on these lo-fi pages, you provide links back to the regular page, since that's what Google will link to.

like image 81
nickf Avatar answered Nov 10 '22 11:11

nickf


Download Lynx and access your site. if you can see your content, google can too!

Here's the link Lynx Viewer

like image 45
Moak Avatar answered Nov 10 '22 09:11

Moak