Web caching when retrieving lists of documents

We need to use client-side resources for lists containing tasks.

The client must:

  • receive notifications about updates in the list
  • be able to reorder / filter the list (request an update from the server with tasks that the client does not know / has in the cache)

The problem occurs on bootstrap or large list updates (going from "assigned to me tasks" to "tasks relative to x")

The quickest thing to do is put all tasks back in the list, not individual (10+) requests.

But E-tags won't help when I request to update a task in the list, since it was not downloaded separately.

Is there a way to force the browser to cache the items in the list against their individual urls?

Or a way to create a javascript cache that will stay away from navigation?

  • If I step aside and go to the task url, will my js objects survive? I suspect not.
  • If I step aside and then cast back, will my javascript objects survive? I suspect so.
    • If so, is it possible to have a "load task list" page that will check the history and return to the existing task list? I think no - security.

I think I just need to do the bootstrap and fetch jobs individually so that later requests are fast (and take the load off the server).

0


source to share


2 answers


In HTML5 there is a Window.sessionStorage attribute that can store content against a specific session within a tab / window (other windows will have their own storage, even when running the same session).



The specification also provides localStorage and database options.

+1


source


HTML5 is still a bit far from implementation, but you can use Google Gears for your local storage needs.



Also, I don't know how many concurrent clients and tasks we are talking about, how important tasks are and how much stress such a query in the database might require, but I think you can run smooth without caching, 10+ queries is not that much and more. Unless traffic is a bottleneck, I would put caching on the server and leave the client "dumb".

+1


source







All Articles