This is a migrated thread and some comments may be shown as answers.

Cache issues with IE update

3 Answers 342 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christy
Top achievements
Rank 1
Christy asked on 19 Jun 2017, 03:42 PM

In my grid options, I am using the dataSource.read() function for my dataSource.sync(). The read function calls an API GET method. This has been running with no issues for about a year. There was an update to IE that seems to be using HTTP/2 that is causing my grid to not refresh with new data any more. When I look in the developer tools for IE, I can see the GET call being made with the HTTP/2 protocol, but the return says it is received "(from cache)" with a time of 0 s. When I look at the Request Headers, the Cache-Control is already set to "no-cache".

This call is not working like this in Edge, Chrome, or FF. However, I am seeing this issue on every page that uses the Kendo UI grid when I am in IE. 

Do you have any suggestions for fixing this issue? Thanks!

3 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 21 Jun 2017, 10:06 AM
Hi Christy,

You should be able to resolve this problem by setting cache: false in the DataSource transport.read options. This will automatically append  a timestamp parameter to the request URL, which will prevent the browser from caching the request. 

Regards,
Tsvetina
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Christy
Top achievements
Rank 1
answered on 21 Jun 2017, 01:18 PM

We are using Angular. Is there a way to include this in the read when our code looks like the following:

vm.myGridOptions.dataSource = new kendo.data.DataSource({
   transport: {
        read: readEvent,
        update: updateEvent,
        create: createEvent
    },
    sync: function (e) {
        vm.myGridOptions.dataSource.read();
    },
    schema: {
        data: 'results',
        total: 'total',
        model: vm.dataModel
    }
});
 
function readEvent(e) {
    // some code here...
    service.read(params).then(
        function(data) {
            e.success(data);
        },
        function(error) {
            // log
        });
}
0
Accepted
Tsvetina
Telerik team
answered on 23 Jun 2017, 11:07 AM
Hello Christy,

In such a case, you need to configure the AngularJS service that you are using to request new data. I do not know what your service implementation looks like but you can still look for a way to send a timestamp parameter or use another trick, which will prevent the browser from caching. There is a discussion on this topic with a few possible solutions here:
Angular IE Caching issue for $http

Regards,
Tsvetina
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Christy
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Christy
Top achievements
Rank 1
Share this question
or