Mobile app version of vmapp.org
Login or Join
Shelley277

: SEO for dynamically inserted content? I've reviewed other questions and answers, but none fit my use case. Frankly, I'm not even sure if I'm asking the right question. Here's my scenario: I

@Shelley277

Posted in: #Javascript #Seo

I've reviewed other questions and answers, but none fit my use case. Frankly, I'm not even sure if I'm asking the right question.

Here's my scenario: I work for an organization that is in the process of rewriting their website.

Let's assume we want to list a phonebook with some entries on a web page. There is a "phonebook component", designed in JavaScript and uses Handlebars as templates. Using grunt it is all uglified, concatenated, and minified in one file called phonebook.js. The way it works is this:


Content editor opens up the page where s/he wants to insert the phonebook. All that person has to do is open the CMS HTML editor and insert this:

<div class="phonebook-component"></div>


And that's it.

Now, what happens is that there's a global.js file that's loaded with every page. This script recognizes any class names that end with -component. When it recognizes the component, it makes a sync call to load the phonebook.js. The component is inserted, and it looks wonderful.

The problem is probably obvious. When you look up at the source code, there where the source code should be is just hat div tag I mentioned. This is what crawlers see too.

My question is: how can I make this crawlable? Is there any way? All my searches so far resulted in answers like "oh, this is how you make your AJAX SPAs crawlable".

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Shelley277

2 Comments

Sorted by latest first Latest Oldest Best

 

@Vandalay111

All you have to do is use Google's pushstate SEO meta tag for your Javascript served content .

Just add this meta tag in your site's <head> section

<meta name="fragment" content="!">


This is all new HTML5 improvement wherein your Javascript served content url's are returned with #! at the end of them to the crawlers. Basically Javascript served content is non crawlable but with this pushstate SEO tag the content shows up and is stored in a # based server with your site's content now visible to the crawler making it crawlable. Read more about it here.

10% popularity Vote Up Vote Down


 

@Pope3001725

oh, this is how you make your AJAX SPAs crawlable


That definitely should point you in the right direction. The search engines have said they have a standard for getting dynamic content indexed and it is very well documented. If you cannot make your application support it you need to do more work to add a search engine, and accessible, friendly version of your content.

FYI, Google does now process JavaScript so that should remedy this, at least fr them.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme