I am about to build a social network website. Each user would have their own page. Though the layout would be the same, but the content would be vary according to each user's data.
My question is should I create a new file that contain static HTML for each user, or just use only one file for all users but the replace corresponding data belong to each user when a request comes?
The problem with multiple copys would be that if you want to change one little detail, you would have to change it in all files an that would introduce errors (and is very time consuming anyway).
In the real world people use a Server, with something like PHP, wich has the HTML-Template and adds the user content based on the page.
If possible use "one file"
You should have one file with variables for "user name" or "user avatar url" that you use to generate every user profile page with the data that you have for each user in your database :)
You are building a social website then it should be dynamic. Do NOT think to create a new page for every user, else it would get worst to handle all files. You should have one layout and you can change the data on run-time with programming languages like php or java.