Improve (perceived) performance in MVC 5 Applications - Part I
In this series, I will cover some techniques that are easy to implement that will improve the performance of a web site. In this post, I will talk about asynchronous partial views.
A couple of weeks ago, I launched my personal website hendrikbulens.com. It is a MVC5 application that is hosted on an Azure website with a SQL Azure database for the data storage. Now that my website is up and running with real-live data, I am experiencing performance issues in different pages of the application. To tackle this problem, there are a few enhancements that a developer can make.
This code will look for every div in the page with class ‘partialContents’ and it will call the URL that is defined in the data-url tag. The result of this call will be HTML which will replace the content in that div. If you want to have more detailed information about this topic, please refer to this article.