Session data vs. JS
Hi,
I wanted to know what is considered best practice. I have a page displaying a list of objects that are of a certain kind of model. Once the page is loaded and the client has successfully viewed a page displaying them I have some ajax send a message to the server saying that this list of objects is now viewed.
What I do now is before loading the page, save an array of ids into a javascript variable, then once the page loads, the AJAX sends this list back and the server marks all objects with these ids as viewed.
Is it better to save this list of ids in session data? And in general, should I be minimizing the amount of data exposed in JS?
Please or to participate in this conversation.