Every time when user makes a click, my website checks for friends who are online and shows the total number.
To reduce the server load I decided to make changes so that only once every 3 minutes script makes a MySQL query to update the number of online friends and the rest of the time it displays information stored in a session or in a cookie:
$timestamp:$number_of_friends
What is better - to store this information in a cookie or as a session variable?
Thanks.