DataStore and IE8 caching

Hi,

I was attempting to get the example at docs.dhtmlx.com/doku.php?id=dhtm … erver-side to work on our server.

During testing, I was verifying that it worked properly with Firefox, Opera, and IE. All versions loaded the example correctly. All samples could add records correctly.

However, on a refresh, records were “lost” in IE while Firefox and Opera worked correctly. Upon further inspection, it seems that IE was “caching” the old data, not the newly updated data.

For example, if there were 10 records in the dataset that was originally loaded, and a record was added, there should now be 11 records in the dataset on the server. In Firefox and Opera, 11 records were displayed, and the dataCount() function of the datastore returned 11. In IE, on a refresh, records were NOT displayed and the dataCount() function of the datastore returned 10 (old dataset count).

Has anyone noticed this particular behavior? If so, is there a workaround that I’m missing.

I’m using the exact example with only path modifications for locations on our server. The server-side connector points to our DB server which has a table with dummy data loaded into it to match the example.

Any insight anyone can provide would be much appreciated as this library seems to work exactly as I would like for an upcoming project.

Thanks, Alan

You can change code as

var employees = new dhtmlXDataStore({
url:“php/employees.php?uid=”+(new Date()).valueOf()
});

Which will result in unique urls for each data loading call.

Also, problem can be resolved by correctly configuring expire headers of server side response ( it possible to mark data as not purposed for caching ).

Thanks, your suggestions worked great. I must have been having an off day, I completely forgot about sending a no-cache via header through php.

Both solutions worked. Again, thank you!