In case I have a need to revisit the previous data , while updating webpages through ajax is it advisable to keep caching the visited data in hidden tabs or hidden divs(instead of just replacing it with new data) so that when the user needs the same data, there is no need to touch the server again ?
Share
It depends on how often it is likely to happen, and how much that extra data might effect your page.
If you user is likely to go back and forth between the data fairly often, and the hits on your server would pile up, then you might wanna keep the data on the page.
But if the data on the page has a lot of event listeners and would slow down querying for elements, then your page might run faster by not bogging down the page with all the extra data.