I am building a simple website that will display some information. This information can be retreived from a third-party service and changes on average a couple of days.
Thus I need a way to dynamically generate my html files. I can see two alternative ways to do this and I don't know if one is better than the other.
I create a script on my server, that periodically checks if the information changed on the third-party service and if it did edits the html markup accordingly and saves the file. Now when a visitor visits my site it will display the updated information
Option 1 puts all the work on my server. Whereas option 2 makes the client browser to fetch the information.
Which option should be preferred and on which cases? What if the data is changing much more frequently?