0

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?

Matt McCormick
  • 13,041
  • 22
  • 75
  • 83

2 Answers2

1

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
  • 26
  • 1
0

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

Tivac
  • 2,553
  • 18
  • 21