Answer the question
In order to leave comments, you need to log in
How to create an HTML version of an AJAX page to be indexed by search engines?
There is an online store with a catalog of goods on AJAX filters.
The Yandex manual says that you need to create an HTML version for each AJAX page for indexing by search engines.
How is this even possible if AJAX pages are dynamic? And you need to create static HTML pages. Or am I misunderstanding something?
Answer the question
In order to leave comments, you need to log in
So when the filter is not enabled, something is displayed by default. Product pages should not be ajax.
A search engine does not need a page with a filter by itself.
Nevertheless, Yandex and Google JS perform on pages and everything goes into the index perfectly
In theory, you first need to make a noajax version, the classic one, so to speak, and then screw event handlers on top of it that will load the filter results via ajax.
Moreover, if you use the history object on js, then you can also control the address bar, i.e. for the user, ajax becomes a nice addition - the page will load faster than with a full reload; But a full reboot remains fully functional.
Example code using jquery:
$('#filter_form').submit(function(){
if (undefined != history)
{
var url = $(this).attr('action') + '?' + $(this).serialize();
history.replaceState({}, '', url);
$.get(
url,
{},
function(answ){
$('#content').html($(answ).find('#content').html());
afterAjax();
},
'html'
);
return false;
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question