JQuery / javascript - performance issue with large numbers of small .js files?

I have a website with a lot of links .js-Files; these are pretty small files, but I want my methods to be separated by theme / functionality.

Is it better to store all the methods in one .js file or is it not a problem to have many (~ 20-30) small files, including only some lines?

+3
source share
4 answers

Be sure to keep them separate for development, but you should consider combining them into a single file for production.

There is a pleasant discussion at sitepoint.com

HTTP , . ( ) . , , , ( ), . .

+3

- nant script, ? , YUI css js, . , , ?

0

, ( ) , Ruby on Rails script, (, ) script ( ) , (, ) . , - .

UPDATE: I just remembered: You can also manually compress (by removing spaces and comments, shortening variable names, etc.) and combine javascript files and CSS files using Yahoo! User Interface Library: YUI Compressor . Just make sure your JavaScript is correct before you compress it, try JSLint .

0
source

All Articles