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
Post a Comment