Dear mark, You are highlighting the main problem of concatenation.
but even a selective concatenation is not very easy. let us take the example of prototype and scriptacuouls, sometimes we need -only prototype -prototype with some scriptaculous files as when building an autocomplete through ajax -prototype with almost all the scriptaculous (maybe except unitest and sound libraries) to use effects and drag drop and sliders on a wow UI page you are right but the decision is not easy. For example If I know that the worst case scenario page will include all the js files of my application and those js after minification and gzipping will have the size of 150k, I will put them into a single file, so the next request for the same page or for another page will be just a verification if something has changed to any of the files since my last request. We should take a decision and it depends on the application. Thank you again for highlight this problem and suggesting a solution but I have another idea, when you javascript files are On Oct 4, 7:22 pm, mark_story <[email protected]> wrote: > Concatenating all JS files into one file is not ideal or optimal. Say > for example that you are using jQuery + all of jQuery UI + page > specific Javascript. Since you are gluing all the files together, on > each new page users will need to redownload all of the library code in > addition to the page specific code. A better solution would be to > make separate concatenated files for different types of JS files, this > would allow more effective caching and better reduce the number and > size of HTTP requests. > > -Mark > > On Oct 3, 2:29 am, Davit Barbakadze <[email protected]> wrote: > > > > > I wonder whether there already written plugin or component which > > automatically concatenates all js and css files used (separately of > > course), compresses them and places them onto corresponng place in the > > layout? > > > So that in the end, for example, no matter how many js files were > > included, in the header only one, compressed will be referenced, > > holding united info of all those included js files. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
