You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually, the point of having separate files is to avoid loading JavaScript code in the browser when it's not needed.
Unless you plan to support that directly in the code (e.g. load the suggestions code only if there's a search bar, etc.), I don't see any advantage in merging and compressing: we improve load time and number of requests, but make the page heavier.
The file would be generated dynamically, from the list of JS files to load for a given view, we would not create a single JS file containing all the other files for all pages.
I think it's a good idea but the thing I don't like about minification is that it makes debugging harder, it would be good to have the js files combined only for production.
Currently, each time we’re adding a JS library, we’re adding a new resource (so a new HTTP request). We might want to combine all of our JS file into a single one and we could use jsmin-php for that ( http://stackoverflow.com/questions/868857/combining-and-compressing-multiple-javascript-files-in-php )
We could also cache the generated file to avoid impacting the process time.
The text was updated successfully, but these errors were encountered: