Abhishek Ghosh

Abhishek Ghosh

  • NA
  • 40
  • 2.4k

MVC _layout file

Jul 31 2017 3:54 AM
I see the same thought everywhere but can't understand why it is so. Please can anyone help me understand.
 
In ASP.NET MVC, pay a lot of attention to keeping the layout file as thin as possible. This means that you should avoid referencing from the layout file CSS and script files that are referenced by all pages based on the layout. As developers, we certainly find it easier and quicker to reference resources used by most pages right from the layout file. But that only produces extra traffic and extra latency.  

Answers (2)