misoproject / dataset

JavaScript library that makes managing the data behind client-side visualisations easy
http://misoproject.com
GNU General Public License v2.0
1.18k stars 99 forks source link

Added option for XHR response cache control #196

Closed craig552uk closed 11 years ago

craig552uk commented 11 years ago

As per issue #195 added an option to control XHR response caching in the browser.

When set with cache: false a random string is append to the query string of the request URL forcing the browser to load the source from the serve on each request.

Default value is cache: true which allows the browser to cache responses.

var ds = new Miso.Dataset({
  url: 'data.csv',
  cache: false,
  delimiter: ','
});

Includes some rudimentary tests. Ensured all existing tests pass.

Have tested manually in IE8 (resolving the identified issue), Chrome and Firefox.

iros commented 11 years ago

Since this can be resolved by setting the url parameter to a function that just appends a random string to the url, this will not be considered core functionality. I will add an FAQ based on your suggestion. Much thanks.