Cache issues with IE update

4 posts, 1 answers
  1. Christy
    Christy avatar
    54 posts
    Member since:
    May 2016

    Posted 19 Jun 2017 Link to this post

    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!

  2. Tsvetina
    Admin
    Tsvetina avatar
    2481 posts

    Posted 21 Jun 2017 Link to this post

    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.
  3. Christy
    Christy avatar
    54 posts
    Member since:
    May 2016

    Posted 21 Jun 2017 in reply to Tsvetina Link to this post

    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
            });
    }
  4. Answer
    Tsvetina
    Admin
    Tsvetina avatar
    2481 posts

    Posted 23 Jun 2017 Link to this post

    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.
Back to Top