When I look through the photos of VKontakte, they are viewed, you can say, instantly (that is, I clicked “next” and now it is open, no delays). At the same time, the browser clearly uploaded a new page, plus changed the address.

At first I thought that just ajax-ohm was loading several at once, and they were scrolling, but there wasn’t. The address is changing, the page is loading. How is this happening so fast?

I looked into the code, there is little that is clear to me (I don't know much about javascript). In general, I saw ajax.post. Well, ok, ajax, but because the page is loading, the address is changing. Ajax does not do this. Unclear.

Who knows, please explain.

  • @ Kostya Zemtsovsky, If you are given a comprehensive answer, mark it as correct (click on the check mark next to the selected answer). - angry

1 answer 1

  1. "Instant" - it seems to you ... Rather, it is a preventive (advanced) loading images
  2. Loading is Ala AJAX
  3. There is no navigation through the pages - this is the History API or anchor, depending on the browser.
  • Thank. I read about the History API. I did not know about such a thing - imkost