T
T
TyllerDurden2021-06-20 03:21:29
AJAX
TyllerDurden, 2021-06-20 03:21:29

How to change url on scroll?

On some sites I saw an interesting thing that I don’t know how to implement. For example, on an article page, when you scroll down, the next article is loaded. I know how it's done. But at the same time, the url also changes, and all this without reloading the page. I don’t know how to change the url to the url of this article along with loading a new article. Of course, I googled and found something there about window.history in js and replacing url through it. But I'm not sure that I'm implementing it correctly, and I'm not creating some kind of crutch that looks similar only visually. In general, tell me how to do such things correctly. Those. along with the page loading, so that the url also changes. And how does this affect seo, too, tell us, if you know. If you throw off a link to some guides on the implementation of this, it will be generally excellent.

Even on the discourse forum engine, on the thread page, when scrolling, the url changes to the url of the current message in the thread. I'm also interested in how to do it right.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question