K
K
kot25662022-02-15 11:16:36
AJAX
kot2566, 2022-02-15 11:16:36

Why do ajax uploads get posts as Html?

Why on some sites that load the catalog via ajax in the form of json, the products themselves come in the form of generated html, and not in json? What is the benefit of such an approach?

620b61304bfaa480194640.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nadim Zakirov, 2022-02-15
@kot2566

It is believed that this way there is less load on the browser, they say you don’t need to generate an html tree based on the received data, but you just take and immediately insert the ready-made html code sent by the server into the page. Less load - faster data display, less lag when scrolling, and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question