---
title: "Where to load JS Scripts in MVC"  
description: "Where to load JS Scripts in MVC"  
author: "alexander sabato"  
published: 2013-02-12  
updated: 2013-02-12  
canonical: https://www.mindstick.com/forum/590/where-to-load-js-scripts-in-mvc  
category: "asp.net mvc"  
tags: ["asp.net mvc"]  
reading_time: 1 minute  

---

# Where to load JS Scripts in MVC

Hi!

I am fairly new to MVC and I have noticed a lot of inconsistencies with loading js files I have written and tried to load.

To start, here is how I have my [website](https://www.mindstick.com/articles/13110/why-copywriting-is-crucial-for-new-website-build) setup:

_Layout.cshtml (main page)\
Index.cshtml\
_MainMenu.cshtml ([partial view](https://www.mindstick.com/articles/1132/auto-refresh-partial-view-in-asp-dot-net-mvc))

\
I render my MainMenu in the body of Layout. All jquery scripts are loaded in the footer of layout (I read somewhere that was preferrable).

When I render a view, I load any specific scripts related to that [content](https://www.mindstick.com/articles/13019/get-the-best-content-marketing-pricing-packages-for-your-brand) at the top of the view.

What is the best way to go about loading [javascript](https://www.mindstick.com/articles/874/how-to-create-watermark-text-for-textbox-by-using-javascript) files (whether it's cdn files from google or files included in my [project](https://www.mindstick.com/articles/105927/how-to-excel-at-managing-multiple-projects))? Should I load all of them in

the header of my layout page, or just load them as I use them? Can someone [please explain](https://www.mindstick.com/forum/344/hi-rohith-i-am-new-for-mvc-please-explain-how-to-set-implicitly-isauthenticated-true) the best [practice](https://yourviews.mindstick.com/story/1498/terrific-benefits-of-a-morning-meditation-practice) and managing/loading/using javascript files in

an [mvc application](https://www.mindstick.com/forum/12932/how-to-consume-webservices-from-asp-dot-net-mvc-application).

Thank you for your input!

## Replies

### Reply by AVADHESH PATEL

Hi Alexander!\
Open below URL and read full article, that provide you complete information related to manage styles and scripts files in MVC.\
http://tempuri.org?link=new \
\


---

Original Source: https://www.mindstick.com/forum/590/where-to-load-js-scripts-in-mvc

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
