Yes. That's the main idea behind technologies like Angular.js.
It's not really a server-side (e.g., in this case, PHP) thing. There is always the possibility that the server won't respond instantly. Although, one might ask, why is page2.php so slow in the first place?