Yes, you have to make some test on your side to understand better, but that is not very complicated once you get the "flow".
On your example, you can paste my code chunk - if ($config->ajax)... - on your template that refer to the page /all/ and then in the click $.post call, just put the url from $pages->get('/all/')->url, it should work out of the box.
PS: If it's a "fun" project, and could be open-source, do not hesitate to export the site-profile to be available to us, it rocks really lol