I asked why below does not work and got a very clear answer .
<head>
...
<script src="Stuff.js" type="text/javascript"></script>
</head>
<body>
...
@Scripts.Render("~/bundles/jquery")
</body>
So, I changed it to this.
<head></head>
<body>
@RenderBody()
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/Stuff.js")
</body>
However, I get the same wrong behavior. Based on the diagnostics from the linked answer, I assume that the scripts are not yet displayed in the correct order. How do I control this? Should I move both headers instead?
The generated markup ends as follows.
</form>
</div>
<script src="/Scripts/jquery-1.10.2.js"></script>
<script src="Stuff.js"></script>
</body>
</html>
As set, I am adding a screenshot of a network tab showing scripts. There are other resources (images, etc.), but none of them are 4xx, no strange messages, and I disabled them, still encountering the same problem.

Default.js( Stuff.js).
window.onload = function() {
console.log($(this));
};
Default.js( ).
$(window).onload(function () { alert("onload"); });
user1675891