Always downloads files again

3 posts, 1 answers
  1. CHRISTOPHER
    CHRISTOPHER avatar
    11 posts
    Member since:
    Jul 2017

    Posted 05 Aug 2019 Link to this post

    I have an ASP.NET MVC application that loads a bunch of javascript files when it starts up.  Every time I create a kendoWindow, I can see in Google Chrome where it reevaluates all the css and javascript files to see if they have changed.  Of course, it always returns 304 responses.  How do I disable this check each time a kendowWindow object is created and opened.  I don't want all these files checked again because it slows things down.  I can enable optimizations in the bundle but that doesn't help much.
  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    5429 posts

    Posted 06 Aug 2019 Link to this post

    Hi Christopher,

    Such behavior is not expected and should not come out-of-the-box from the Kendo Window. 

    The only reason I can think of for something like that to happen is that the window loads a view that also carries those assets. When the response from such a view is parsed by the browser, the browser will initiate requests for them and it is often that they will return with a "not modified".

    If this view is in an iframe, that would be normal, expected, and necessary, because the iframe creates its own context and the Kendo widgets inside will need those assets. If you are fetching a view with AJAX to place its contents on the current page, you must remove those assets from that view. They must be added only once.

    If this does not help you resolve this, I will need you to send me a small runnable example that showcases the problem in the Kendo Window so I can examine it.


    Regards,
    Marin Bratanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. CHRISTOPHER
    CHRISTOPHER avatar
    11 posts
    Member since:
    Jul 2017

    Posted 06 Aug 2019 in reply to Marin Bratanov Link to this post

    I see the stupid mistake now.  Thank you very much.

     public ActionResult Index()
     {
           return View();
     }

    Should have been the following in the MVC controller.

     public ActionResult Index()
      {
            return PartialView();
       }

Back to Top