Turn grid caching off for IE using web API

3 posts, 1 answers
  1. BRAD
    BRAD avatar
    27 posts
    Member since:
    May 2012

    Posted 23 Jun 2015 Link to this post

    I have an IE problem with caching that i've seen many different places.  My grid works fine on chrome/firefox, and it loads fine on IE.  but if i add a new row set of data, the IE grid refresh doesn't show it.  It's caching and I don't have a way to turn it off.  The options i've seen on your site are:

    1. set output cache to nostore ( http://www.sliqtools.co.uk/blog/net/asp-net-mvc-disable-cache-to-keep-ajax-working-ok/ ) , but this option is ONLY available in the MVC controller, not Web API.
    2. use cache:false (https://stackoverflow.com/questions/14975103/how-to-disable-read-request-cache-in-kendo-ui-data-source).  This option isn't available as an MVC wrapper though.  
    3. use HttpPost instead of HttpGet ( http://www.telerik.com/forums/prevent-ajax-caching-on-read ) .  This option actually does work, but it breaks paging.  For some reason it shows ALL rows in the grid, but still shows the paging at the bottom as if it was only showing 10 rows.  Very odd, and totally broken (clicking on any of the paging buttons does nothing).

    Are there any other options out there for an MVC Wrapper, Web API datasource that can't use HttpPost?  

  2. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3747 posts

    Posted 26 Jun 2015 Link to this post

    Hello BRAD,

    Generally speaking, the best way to go with this task is to implement a custom Action filter that will disable cache: In both cases, you will need to setup your service to add additional Response headers that will tell IE to stop its intrusive caching process.

    Regards,
    Georgi Krustev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. BRAD
    BRAD avatar
    27 posts
    Member since:
    May 2012

    Posted 26 Jun 2015 in reply to Georgi Krustev Link to this post

    Thanks, the first option fixed my problem.
Back to Top