When is it advisable to use AJAX?

When is it advisable to use AJAX?
What are the pros and cons of using AJAX?

In response to my last question: some people seemed very adamant that I should use AJAX only if the situation was suitable: Should I add AJAX logic to my PHP classes / scripts?

In response to Chad Birch's answer: Yes, I mean when developing a โ€œstandardโ€ site that would use AJAX to its advantage and not cripple its application. Using AJAX in such a way as to kill search ranking would be unacceptable. Therefore, if โ€œkeeping the site intactโ€ requires more work than it would be โ€œconโ€.

+3
source share
8 answers

This is a pretty big subject, but you should use AJAX to improve the user interface without making the site completely dependent on it. Remember that search engines and some other visitors will not be able to perform AJAX, so if you rely on it to upload your content, this will not work in your favor.

For example, you might think that it would be nice if users visited your blog and then the page was dynamically loaded with the latest articles using AJAX as soon as they are already there. However, when Google tries to index your blog, it just gets a blank site.

, , " ". , , . , :

http://www.alistapart.com/articles/progressiveenhancementwithjavascript/

+8

, , , , AJAX . , - . , , ( ) , AJAX .

AJAX , javascript, , . , /.

+5

AJAX HTTP-, ( ).

view. , , .

. , , , javascript .

+2

, ajax , , .

, eater (, stackoverflow), , , , HTTP.

, , , HTML .

- SEO ( ajax) , JavaScript.

+2

( ) , -.

+1

Ajax :

- - , ( ). , , .

- . AJAX , , - , . , , iPhone. , .

. AJAX, , , , , , - .

+1

Ajax , , .

:

  • , ( , ).
  • ( , . , .
    . , , , . , .. Ajax, , . )

:

  • .
  • .
0

Javascript should always be just a complement to the functionality of your site. You should be able to use and navigate the site without Javascript. You can use Javascript as an addition to existing functions, for example, to avoid reloading the page. This is an important factor in accessibility. Javascript should never be used as the only opportunity to receive or fill out a request on your site.

Since AJAX uses Javascript, the same applies here.

0
source

Source: https://habr.com/ru/post/1703373/


All Articles