I think you're talking about single-page apps, if you're talking about the same use case as the original article.
That might be OK for some instances but many times, one needs to be able to serve a browser directly.
Your idea of a API is still a good one, you might just change the level at which you create this "backend" API.