Browser caching of object

cpopham

Junior Contributor
Joined
Feb 18, 2004
Messages
273
I have been attempting to find out how to cache a dataset into the clients browser cache. I am going to have users which will have information in a database that is for them. Each user will have different information, so instead of caching the dataset on the server, I want to cache it on the users computer. Can someone help me out?

Thank you,
Chester
 
cpopham said:
I have been attempting to find out how to cache a dataset into the clients browser cache. I am going to have users which will have information in a database that is for them. Each user will have different information, so instead of caching the dataset on the server, I want to cache it on the users computer. Can someone help me out?

Thank you,
Chester

Caching reasonably large amounts of data (size of a dataset is the kind of animal that tends to grow beyond expectations)
on the client side could be troublesome (not taking into account security and performance implications)

*you need to implement client-side caching mechanism (persistence, expiration, etc) using script code
*you also need to write some script code to populate/update client side UI (it might not
be a problem if you already using script on the client side though)


Therefore, I recommend storing a dataset in the session state stored on the server.

By storing it in the session each user will have its own copy of data and session
will also take care about cleaning up memory upon session's expiration.

However the main reason to implement caching on the server is what you would need to write less code
and this code going to be much simpler (especially if you're using ASP.NET) compared to a client side,
script-based implementations.
 
Back
Top