ajax realtime + localstorage