S
S
Slava902015-01-12 20:04:46
JavaScript
Slava90, 2015-01-12 20:04:46

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

3 answer(s)
X
xmoonlight, 2015-01-12
@xmoonlight

here

A
Alexander Aksentiev, 2015-01-12
@Sanasol

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

O
Oleg Prilepa, 2015-01-12
@OAPrilepa

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;
        }
    });

You can see how it works here: aacase.ru/catalog

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question