Facebook and Ajax

How does Facebook Ajax work? 2-3 months ago they used #, but now the entire address bar is changing.

+6
source share
2 answers

The first approach used is called " Ajax Crawling " (also see this answer ).

But I think the new approach you are talking about is just an HTML5 history API . Github uses this approach to view the tree, and you can learn more about it here . (I recommend ALL readers to read and watch the video, as it is very informative)

EDIT:
Just point out that Facebook is definitely using the HTML5 History API (a direct link from a previous github article).

+10
source

They are still using #, as far as I can tell (but maybe we are in different versions?). For me, their links are for different pages, but they intercept my onclick and instead change the click on the Ajax request. Maybe this is to make clean URLs when copying and / or make it work without JS?

0
source

Source: https://habr.com/ru/post/886714/


All Articles