title: how to cache posts in javascript then fetch only the new ones?
body: <p>i've made a site that let people write posts like facebook,etc...
  but i came to a problem of fetching those posts everytime the client requests it from the database over and over again 
  so i needed to cache the previous posts and fetch only the new ones from the DB
  lets say i have posts 1,2,3,4,5 that are cached and the server has posts 1,2,3,4,5,6
  how can i fetch only post 6?
  i mean how can i tell the server that i have 1...5 posts?
  give me a headway of caching posts techniques please
  i'll be gratefull
  thanks in advance</p>