javascript - Is incluing many .js files via one php file a good practice? -


i'm working on big project, organization purpuses links many .js files, jquery plugins base javascript code. every link .js file in index.php generates new request server. practice have 1 link php file fopens .js files , echoes content?

will explain better example, this:

<script src="/js/scripts.php"></script> 

instead of this:

<script src="/js/1.js"></script> <script src="/js/2.js"></script> ... <script src="/js/n.js"></script> 

in development should separate file cause sake of debugging , organizing. in production, files should minified 1 , pushed cdn :)


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -