How is the relationship between crawlers and ajax applications?
Do the web crawlers or browsers read dynamically created meta tags?
I thought about:
- adding anchors to the page
- creating permalinks to the content
- dynamically adding meta tags.
http://code.google.com/web/ajaxcrawling/docs/learn-more.html
Update in how Google handles SEO with JavaScript:
https://searchengineland.com/tested-googlebot-crawls-javascript-heres-learned-220157 which seems pretty good at this point so I would ignore most of what I wrote at this stage.
initial writeup:
JavaScript doesn't do much for you in terms of SEO in a practical sense. The search engines mostly see raw text just as you see the page source. The search engine does not run JavaScript on this page source, it is literally like you are looking at it for the most part. A more useful approach would be to explain how you can make your website SEO compatible now while using AJAX instead of relying on very limited support for search engines spidering JavaScript. This is very straight forward if you know the formula.
Its important to understand first of all if you should even do this. For starters, if your website is primarily a programmatic based form or an HTML5 game for example then you have no need to worry about SEO other than setting the initial meta tags and having content on the page that explains what it is about. If you have a content-based website or especially an ecommerce-based website this is a different story and you need to be very careful that all your content is searchable first then add in the AJAX as icing.
My background is creating SEO and social friendly ecommerce websites that have AJAX interactivity for serving product views and content. I also have created many information-based websites that serve content through AJAX that are SEO compatible. If you visit my profile you can see several websites where this is occurring such as http://www.klim.com/en-us/shop (ecommerce example) and http://www.kitgui.com/docs (purely content example). These sites are very high end in terms of implementation and some nearing the 100K mark in terms of the size of the projects I take on. In other words, the clients are very serious and expect a great return on investment so SEO is highly important.
The approach is quite simple and easier to understand than Google's proposal.
- Make your website work without AJAX where applicable. Any content served should be directly linked via a unique URL that causes the browser to make another request (not a hash tagged URL). Focus on just content serving being plain jane for the first step.
- Wherever you want content serving to use AJAX, use jQuery and attach a click event to cancel the current click behavior then use the jQuery "load" method to draw in content via AJAX and fill in your content area on your page. Ensure you set the hash on the URL each time you do this to the actual URL relative to the root but appended as a hash tag like so: /myoriginalURL#/mynewurl so the thing after the hash is the actual real URL you would go to.
- Take care to support the hashchange event until the HTML5 history manipulation becomes more supported. This will allow you to use the history back/forward buttons and bookmarking.
If you want to see actual implementation spelled out, I answered another related post on Stack Overflow you can find here -> see post that is very detailed and explains how to do this in a real world scenario.
In all this yapping on about SEO, do not forget the increasing importance of these other ways to get traffic rolling into your website:
- Open Graph
- The Sematic Web
- Social Likes (Facebook, Twitter, Disqus, AddThis, etc etc)
Google is the only search engine that currently offers any kind of support for indexing dynamically created content. And this is only if you follow their crawlable Ajax proposal. Not following their proposal means that content will not be crawled or indexed. Meta tags do not fall under that proposal but that's ok, though, because meta tags do not affect a page's rankings.
FYI, using Ajax or JavaScript in general to generate all of your content is a really bad idea.