I have a website that uses a lot of jquery / javascript. Now, on the index page, I have about 10 javascript files included in the head:
<head>
<script src="/js/jquery.js"></script>
<script src="/js/jquery_plugin_1.js"></script>
<script src="/js/jquery_plugin_2.js"></script>
<script src="/js/jquery_plugin_3.js"></script>
<script src="/js/my_scripts_1.js"></script>
<script src="/js/my_scripts_2.js"></script>
<script src="/js/my_scripts_3.js"></script>
<script src="/js/my_scripts_4.js"></script>
</head>
As the number of visitors grows, I'm starting to think about the performance of all this. I read that it is a good idea to minimize all javascript files and put them together in one, so the browser should only make one HTTP request. I have done it. Now I have a file everything.jscontaining all javascript, including jquery, plugins and my own scripts.
<head>
<script src="/js/everything.js"></script>
</head>
, . , , , everything.js . - .
: , ? -, , , , ?
PHP5 SVN
, , :
post-commit SVN-, .js, YUI. , script, fork javascript, javascript, .