Reputation: 145
I am struggling to get some performance in my MVC application.I am loading a partial page (popup) which is taking hardly 500ms. But each time the popup loads it also downloads 2 jQuery files as well. is it possible to use the jQuery from cache or from parent page?
I have attached the image in red which shows 2 additional request to server.
Upvotes: 0
Views: 97
Reputation: 485
Does the popup use an iframe or does it's content just get added to the DOM of the current page?
If it gets added to the current page you could try just adding the script references to the parent page instead. It might not always be the best idea if the parent page has no need for those two files, but if the parent page also uses the jQuery validation then the popup will be able to use the parent's reference to the script file.
For an iframe I'd suggest looking at Gzip and minification to make the scripts load faster.
Upvotes: 1
Reputation: 971
In the Bundle config use this code
BundleTable.EnableOptimizations = true;
and also indclude both files in single bundle.
Upvotes: 1
Reputation: 329
In order to improve the performance you can try with the following approaches:
In general, I recommend you using Google Chrome browser and its performance analyzer. It will give you good hints.
Upvotes: 1