views:

67

answers:

2

I'm setting up a YUI DataTable with filtering by following the steps on the YUI site

However, I am using JSON as the DataSource ResponseType. When I type in a value to filter, the request will be sent to the server again. I find this to be wasteful as all the data has already been retrieved the first time.

Is there a way to cache the initial data returned and then filter only according to that data so another AJAX request does not have to be made?

A: 

http://developer.yahoo.com/yui/datasource/#caching should help.

Tivac
A: 

You can use the YUI 3 cache utility to cache the data in javascript memory or HTML5 localstorage object. You can read more about this at http://developer.yahoo.com/yui/3/cache

Saurabh