First,
build an old-fashioned website that uses hyperlinks and forms to pass
information to the server. The server returns whole new pages with each
request.
Now, use JavaScript to intercept
those links and form submissions and pass the information via
XMLHttpRequest instead. You can then select which parts of the page
need to be updated instead of updating the whole page.