P
P
pavuuuk2019-08-15 20:08:12
JavaScript
pavuuuk, 2019-08-15 20:08:12

How to properly organize the loading of articles on the page?

There should be about a dozen articles on the page, and then they should load via ajax while scrolling. Question: how to download the FIRST articles? Like, send an ajax request to the server when the page loads (window.onload)? Or do I need to somehow send a request before the page is fully loaded?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hzzzzl, 2019-08-15
@hzzzzl

I would put a request in onload, anyway, there is nowhere to draw news until the page is ready
(but if something else on the page takes a long time to load, and then the first news loads even longer, then you need to look)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question