caching problems with datatables 1.6.2

caching problems with datatables 1.6.2

sonicbugsonicbug Posts: 26Questions: 0Answers: 0
edited May 2011 in General
Hi Allan:

I am having issues with caching. For example, when I update a csv file, the changes don't appear immediately in the dataTable, I have to clear the cache and refresh the page to see the newly updated information. This issue is only confined to our internal network. It seems that the page request is going to the web proxy instead of to the actual server. I have checked the settings for datatables and I have the following

[code]
"bStateSave": false,
[/code]

so
iCookieDuration should not matter. I have added the following meta data to the html page so that the page is not cached.





which I added in 2 sections of the html document to account for IE.

I have read that caching issues can arise while using jQuery. Is there something I have overlooked in dataTables?

Any thoughts on this are greatly appreciated.

Thanks again,

Replies

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Are you getting the data by Ajax? If so is it a GET request? That would be the problem if both answers are yes. IE will cache GET Ajax requests. The way around it is to add a random number (or whatever) to the Ajax request. jQuery has a 'cache' option for exactly this and it is enabled by default in the Ajax handling of DataTables 1.7+ (but not 1.6). You'll need to add the cache parameter to the Ajax request for that to work.

    Allan
This discussion has been closed.