html - Efficiency when loading JavaScript -


i keep efficiency , performance first priority...

so have question in mind...which 1 load faster.

case 1:

a 1000 line code in single file placed @ bottom of body tag.

case 2:

the same 1000 line code divided separate files like.

file 1 - 200 lines.

file 2 - 200 lines.

file 3 - 200 lines.

file 4 - 200 lines.

file 5 - 200 lines.

case 1 more faster.

on every new file, browser request server it's additional time (about 200ms). if using 1 single file, it's more efficient, because browser 1 request server.

more information speeding web sites in this article.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -