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

Always downloads files again

2 Answers 110 Views
Window
This is a migrated thread and some comments may be shown as answers.
CHRISTOPHER
Top achievements
Rank 1
Iron
Iron
CHRISTOPHER asked on 05 Aug 2019, 08:39 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 06 Aug 2019, 07:25 AM
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.
0
CHRISTOPHER
Top achievements
Rank 1
Iron
Iron
answered on 06 Aug 2019, 08:33 PM

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();
   }

Tags
Window
Asked by
CHRISTOPHER
Top achievements
Rank 1
Iron
Iron
Answers by
Marin Bratanov
Telerik team
CHRISTOPHER
Top achievements
Rank 1
Iron
Iron
Share this question
or