Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Size of .js files vs speed 1

Status
Not open for further replies.

TheKeeya

Programmer
May 7, 2003
6
0
0
US
Does a really large javaScript file slow down the load speed of a webpage?

Also, does it take longer to load a large .js file vs. multiple small files?
 
1) a really large one, yes, just as any large file will take a while to download. the benefit of separating the script from the page out to a .js file is that it only need be downloaded once - after that it is cached.

2) i doubt it. 500k is 500k whether it be one file or 10 50k files.


=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top