> Simply create the index on the fly in memory, turn it into a string, and send that to the client?

Sounds good.

> so none says that there has to be a file behind /archive-contents

No, the file is just for performance if you have a large index.