In my opinion, the two best ways to do this (one of which I
have first hand experience) are:
Use Cookies - though not recomended because they are very
limited and very volatile
Create a server application to wrap the output, and store in
a database on the server (this is one with which I have first hand
experience)