When is it appropriate to use AJAX?

前端 未结 8 1543
生来不讨喜
生来不讨喜 2021-01-06 09:24

When is it appropriate 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 only

8条回答
  •  無奈伤痛
    2021-01-06 09:54

    Javascript should always just be an addition to the functionality of your website. You should be able to use and navigate the site without any Javascript involved. You can use Javascript as an addition to existing functionality, for example to avoid full-page reloads. This is an important factor for accessibility. Javascript should never be used as the only possibility to reach or complete a request on your site.

    As AJAX makes use of Javascript, the same applies here.

提交回复
热议问题