I have built an almost amazing chat app, the problem however, is that each time i click a user to chat with using this route
var routes = [
i have to load an ajax content of old chats. This means that i also have to load this everytime a user clicks a similar link.
What i want is that the page should be created dynamically and ready for use the next time the page is visited. I want old chats to remain so its available when user has not closed the app.
how do i go about this.
right now the page is refetch for every click instead of just visiting the page once its been visited before.
I dont know if am making any sense. please help