What is this script?

I have an ASP.NET MVC 4 application. This references the Js file as follows:

<script type="text/javascript" src="http://localhost:32967/Scripts/MyScripts/Myscript.js"></script>

While loading this script, a blocking time was observed in the browser. Googling for this, I found the link here

When you add this script, the lock is complete. In fact, no locks were found to add additional script links. This greatly accelerated the speed.

Can someone explain what this script does? If blocking can be avoided by doing this, then why is this not the best practice?

[ Refresh ] I changed the script name from Reference.js to MyScript.js, as this causes confusion with another question using _reference.js.

Here is the contents of this file:

var urls = {
commonUrl: "http://localhost:32944/",
myappurl: "http://localhost:32967/",
productUrl: "http://localhost:49880/"
}

That is all that is in this file.

Sincerely.

+3
2

References.js - Visual Studio IDE , Intellisense. - HTML script , .

-, script . , - script -.

edit. , . _references.js, , .

+1

:

? , , HTML script, script. , , , , . , . .

? :

  • , .
  • HTML
  • SEO HTML

# 1: , script. , , . , ( ), .

, , . , . , - , .

, , script, webdigi. , , , n, k, e, g C. , , JQuery JQuery. : JQuery UI , ​​JQuery, :

<html>
    <head>
        <script>
            var headNode = document.getElementsByTagName("HEAD")[0];
            // Jquery
            var c1 = document.createElement("script");
            c1.type= "text/javascript";
            c1.src = "http://code.jquery.com/jquery-2.1.0.min.js";

            // JQuery UI
            var c2 = document.createElement("script");
            c2.type= "text/javascript";
            c2.src = "http://code.jquery.com/ui/1.10.4/jquery-ui.min.js";

            headNode.appendChild(c1);
            headNode.appendChild(c2);
        </script>
    </head>
    <body>
        Content goes here
    </body>
</html>
+1

All Articles