Combo box doesnt call the read function each time the page is loaded in IE

2 posts, 0 answers
  1. Thomas
    Thomas avatar
    2 posts
    Member since:
    Jul 2013

    Posted 17 Sep 2013 Link to this post

    in IE 8,9,10 (haven't tested anything lower) the read function only gets called once even if navigate back and then reopen the page. 

    My data is partners are made up of properties. so in the property edit page i have a combobox that is filled with active partners(its a bit field) i have the read saying only grab active partners to fill the combobox. the first time you enter the property edit page for property 1 it calls the read and populates the combobox with partners 1, 2, 3. Now if you navigate away from that page and mark partner 1 as not active then go back to any property edit page property 1,2,3,4,5 the combobox still shows the now inactive partner 1. in chrome this works fine and it calls read again on page load and the dropdown only has 2,3 but in ie it never calls it again unless you hit refresh on the page. and even calling datasource.read in script doesnt call the read function again.

    This is an issue with ie caching things and not pulling from the server (if you open f12 developer tools in ie and select 'Cache' and then 'Always refresh from server' it works just like chrome does)  but even when i turn on server filtering it never tries to repull. i have no idea how to fix this issue. I cant tell people visiting my site that they have to go into ie options and turn off caching.
  2. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 19 Sep 2013 Link to this post

    Hello Thomas,

    You can prevent the browser from caching the requests by using the OutputCacheAttribute on the action methods:

    [OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
    public ActionResult Read(..)
    You could also use the jQuery ajaxSetup method to disable the caching for all requests.

    Regards,
    Daniel
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top