Why Asp.Net MVC 5 put @Scripts.Render(“~/bundles/jquery”) at the bottom in _Layout.cshtml?

前端 未结 4 1778
臣服心动
臣服心动 2021-02-04 02:18

I put

4条回答
  •  离开以前
    2021-02-04 02:36

    If the script is at the top of the page, and there are problems then it may cause the page to stop/take a long time loading. Putting them at the bottom allows the page the render fully before your scripting goes to work.

提交回复
热议问题