Actually got into implementing this and figured out it was much easier to do without saving to the temp folder. Right now the last viewed data is loaded asynchronously when the page is loaded.